<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - Lua 5.4.0-alpha - src/lvm.c</title>
  <link rel="stylesheet" type="text/css" href="../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../index.html">top level</a> - <a href="index.html">src</a> - lvm.c</td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">Lua 5.4.0-alpha</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">724</td>
            <td class="headerCovTableEntry">829</td>
            <td class="headerCovTableEntryMed">87.3 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2019-06-13 19:44:19</td>
            <td></td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<span class="lineNum">       1 </span>            : /*
<span class="lineNum">       2 </span>            : ** $Id: lvm.c $
<span class="lineNum">       3 </span>            : ** Lua virtual machine
<span class="lineNum">       4 </span>            : ** See Copyright Notice in lua.h
<span class="lineNum">       5 </span>            : */
<span class="lineNum">       6 </span>            : 
<span class="lineNum">       7 </span>            : #define lvm_c
<span class="lineNum">       8 </span>            : #define LUA_CORE
<span class="lineNum">       9 </span>            : 
<span class="lineNum">      10 </span>            : #include &quot;lprefix.h&quot;
<span class="lineNum">      11 </span>            : 
<span class="lineNum">      12 </span>            : #include &lt;float.h&gt;
<span class="lineNum">      13 </span>            : #include &lt;limits.h&gt;
<span class="lineNum">      14 </span>            : #include &lt;math.h&gt;
<span class="lineNum">      15 </span>            : #include &lt;stdio.h&gt;
<span class="lineNum">      16 </span>            : #include &lt;stdlib.h&gt;
<span class="lineNum">      17 </span>            : #include &lt;string.h&gt;
<span class="lineNum">      18 </span>            : 
<span class="lineNum">      19 </span>            : #include &quot;lua.h&quot;
<span class="lineNum">      20 </span>            : 
<span class="lineNum">      21 </span>            : #include &quot;ldebug.h&quot;
<span class="lineNum">      22 </span>            : #include &quot;ldo.h&quot;
<span class="lineNum">      23 </span>            : #include &quot;lfunc.h&quot;
<span class="lineNum">      24 </span>            : #include &quot;lgc.h&quot;
<span class="lineNum">      25 </span>            : #include &quot;lobject.h&quot;
<span class="lineNum">      26 </span>            : #include &quot;lopcodes.h&quot;
<span class="lineNum">      27 </span>            : #include &quot;lstate.h&quot;
<span class="lineNum">      28 </span>            : #include &quot;lstring.h&quot;
<span class="lineNum">      29 </span>            : #include &quot;ltable.h&quot;
<span class="lineNum">      30 </span>            : #include &quot;ltm.h&quot;
<span class="lineNum">      31 </span>            : #include &quot;lvm.h&quot;
<span class="lineNum">      32 </span>            : 
<span class="lineNum">      33 </span>            : 
<span class="lineNum">      34 </span>            : /*
<span class="lineNum">      35 </span>            : ** By default, use jump tables in the main interpreter loop on gcc
<span class="lineNum">      36 </span>            : ** and compatible compilers.
<span class="lineNum">      37 </span>            : */
<span class="lineNum">      38 </span>            : #if !defined(LUA_USE_JUMPTABLE)
<span class="lineNum">      39 </span>            : #if defined(__GNUC__)
<span class="lineNum">      40 </span>            : #define LUA_USE_JUMPTABLE       1
<span class="lineNum">      41 </span>            : #else
<span class="lineNum">      42 </span>            : #define LUA_USE_JUMPTABLE       0
<span class="lineNum">      43 </span>            : #endif
<span class="lineNum">      44 </span>            : #endif
<span class="lineNum">      45 </span>            : 
<span class="lineNum">      46 </span>            : 
<span class="lineNum">      47 </span>            : 
<span class="lineNum">      48 </span>            : /* limit for table tag-method chains (to avoid infinite loops) */
<span class="lineNum">      49 </span>            : #define MAXTAGLOOP      2000
<span class="lineNum">      50 </span>            : 
<span class="lineNum">      51 </span>            : 
<span class="lineNum">      52 </span>            : /*
<span class="lineNum">      53 </span>            : ** 'l_intfitsf' checks whether a given integer is in the range that
<span class="lineNum">      54 </span>            : ** can be converted to a float without rounding. Used in comparisons.
<span class="lineNum">      55 </span>            : */
<span class="lineNum">      56 </span>            : 
<span class="lineNum">      57 </span>            : /* number of bits in the mantissa of a float */
<span class="lineNum">      58 </span>            : #define NBM             (l_mathlim(MANT_DIG))
<span class="lineNum">      59 </span>            : 
<span class="lineNum">      60 </span>            : /*
<span class="lineNum">      61 </span>            : ** Check whether some integers may not fit in a float, testing whether
<span class="lineNum">      62 </span>            : ** (maxinteger &gt;&gt; NBM) &gt; 0. (That implies (1 &lt;&lt; NBM) &lt;= maxinteger.)
<span class="lineNum">      63 </span>            : ** (The shifts are done in parts, to avoid shifting by more than the size
<span class="lineNum">      64 </span>            : ** of an integer. In a worst case, NBM == 113 for long double and
<span class="lineNum">      65 </span>            : ** sizeof(long) == 32.)
<span class="lineNum">      66 </span>            : */
<span class="lineNum">      67 </span>            : #if ((((LUA_MAXINTEGER &gt;&gt; (NBM / 4)) &gt;&gt; (NBM / 4)) &gt;&gt; (NBM / 4)) \
<span class="lineNum">      68 </span>            :         &gt;&gt; (NBM - (3 * (NBM / 4))))  &gt;  0
<span class="lineNum">      69 </span>            : 
<span class="lineNum">      70 </span>            : /* limit for integers that fit in a float */
<span class="lineNum">      71 </span>            : #define MAXINTFITSF     ((lua_Unsigned)1 &lt;&lt; NBM)
<span class="lineNum">      72 </span>            : 
<span class="lineNum">      73 </span>            : /* check whether 'i' is in the interval [-MAXINTFITSF, MAXINTFITSF] */
<span class="lineNum">      74 </span>            : #define l_intfitsf(i)   ((MAXINTFITSF + l_castS2U(i)) &lt;= (2 * MAXINTFITSF))
<span class="lineNum">      75 </span>            : 
<span class="lineNum">      76 </span>            : #else  /* all integers fit in a float precisely */
<span class="lineNum">      77 </span>            : 
<span class="lineNum">      78 </span>            : #define l_intfitsf(i)   1
<span class="lineNum">      79 </span>            : 
<span class="lineNum">      80 </span>            : #endif
<span class="lineNum">      81 </span>            : 
<span class="lineNum">      82 </span>            : 
<span class="lineNum">      83 </span>            : 
<span class="lineNum">      84 </span>            : /*
<span class="lineNum">      85 </span>            : ** Try to convert a value to a float. The float case is already handled
<span class="lineNum">      86 </span>            : ** by the macro 'tonumber'.
<span class="lineNum">      87 </span>            : */
<span class="lineNum">      88 </span><span class="lineCov">         30 : int luaV_tonumber_ (const TValue *obj, lua_Number *n) {</span>
<span class="lineNum">      89 </span>            :   TValue v;
<span class="lineNum">      90 </span><span class="lineCov">         30 :   if (ttisinteger(obj)) {</span>
<span class="lineNum">      91 </span><span class="lineCov">         18 :     *n = cast_num(ivalue(obj));</span>
<span class="lineNum">      92 </span><span class="lineCov">         18 :     return 1;</span>
<span class="lineNum">      93 </span>            :   }
<span class="lineNum">      94 </span><span class="lineCov">         19 :   else if (cvt2num(obj) &amp;&amp;  /* string coercible to number? */</span>
<span class="lineNum">      95 </span><span class="lineCov">          7 :             luaO_str2num(svalue(obj), &amp;v) == vslen(obj) + 1) {</span>
<span class="lineNum">      96 </span><span class="lineNoCov">          0 :     *n = nvalue(&amp;v);  /* convert result of 'luaO_str2num' to a float */</span>
<span class="lineNum">      97 </span><span class="lineNoCov">          0 :     return 1;</span>
<span class="lineNum">      98 </span>            :   }
<span class="lineNum">      99 </span>            :   else
<span class="lineNum">     100 </span><span class="lineCov">         12 :     return 0;  /* conversion failed */</span>
<span class="lineNum">     101 </span>            : }
<span class="lineNum">     102 </span>            : 
<span class="lineNum">     103 </span>            : 
<span class="lineNum">     104 </span>            : /*
<span class="lineNum">     105 </span>            : ** try to convert a float to an integer, rounding according to 'mode':
<span class="lineNum">     106 </span>            : ** mode == 0: accepts only integral values
<span class="lineNum">     107 </span>            : ** mode == 1: takes the floor of the number
<span class="lineNum">     108 </span>            : ** mode == 2: takes the ceil of the number
<span class="lineNum">     109 </span>            : */
<span class="lineNum">     110 </span><span class="lineCov">        511 : int luaV_flttointeger (lua_Number n, lua_Integer *p, int mode) {</span>
<span class="lineNum">     111 </span><span class="lineCov">        511 :   lua_Number f = l_floor(n);</span>
<span class="lineNum">     112 </span><span class="lineCov">        511 :   if (n != f) {  /* not an integral value? */</span>
<span class="lineNum">     113 </span><span class="lineCov">        396 :     if (mode == 0) return 0;  /* fails if mode demands integral value */</span>
<span class="lineNum">     114 </span><span class="lineNoCov">          0 :     else if (mode &gt; 1)  /* needs ceil? */</span>
<span class="lineNum">     115 </span><span class="lineNoCov">          0 :       f += 1;  /* convert floor to ceil (remember: n != f) */</span>
<span class="lineNum">     116 </span>            :   }
<span class="lineNum">     117 </span><span class="lineCov">        115 :   return lua_numbertointeger(f, p);</span>
<span class="lineNum">     118 </span>            : }
<span class="lineNum">     119 </span>            : 
<span class="lineNum">     120 </span>            : 
<span class="lineNum">     121 </span>            : /*
<span class="lineNum">     122 </span>            : ** try to convert a value to an integer, rounding according to 'mode',
<span class="lineNum">     123 </span>            : ** without string coercion.
<span class="lineNum">     124 </span>            : ** (&quot;Fast track&quot; handled by macro 'tointegerns'.)
<span class="lineNum">     125 </span>            : */
<span class="lineNum">     126 </span><span class="lineCov">       4758 : int luaV_tointegerns (const TValue *obj, lua_Integer *p, int mode) {</span>
<span class="lineNum">     127 </span><span class="lineCov">       4758 :   if (ttisfloat(obj))</span>
<span class="lineNum">     128 </span><span class="lineCov">         73 :     return luaV_flttointeger(fltvalue(obj), p, mode);</span>
<span class="lineNum">     129 </span><span class="lineCov">       4685 :   else if (ttisinteger(obj)) {</span>
<span class="lineNum">     130 </span><span class="lineCov">       4473 :     *p = ivalue(obj);</span>
<span class="lineNum">     131 </span><span class="lineCov">       4473 :     return 1;</span>
<span class="lineNum">     132 </span>            :   }
<span class="lineNum">     133 </span>            :   else
<span class="lineNum">     134 </span><span class="lineCov">        212 :     return 0;</span>
<span class="lineNum">     135 </span>            : }
<span class="lineNum">     136 </span>            : 
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span>            : /*
<span class="lineNum">     139 </span>            : ** try to convert a value to an integer.
<span class="lineNum">     140 </span>            : */
<span class="lineNum">     141 </span><span class="lineCov">       4625 : int luaV_tointeger (const TValue *obj, lua_Integer *p, int mode) {</span>
<span class="lineNum">     142 </span>            :   TValue v;
<span class="lineNum">     143 </span><span class="lineCov">       4625 :   if (cvt2num(obj) &amp;&amp; luaO_str2num(svalue(obj), &amp;v) == vslen(obj) + 1)</span>
<span class="lineNum">     144 </span><span class="lineCov">          3 :     obj = &amp;v;  /* change string to its corresponding number */</span>
<span class="lineNum">     145 </span><span class="lineCov">       4625 :   return luaV_tointegerns(obj, p, mode);</span>
<span class="lineNum">     146 </span>            : }
<span class="lineNum">     147 </span>            : 
<span class="lineNum">     148 </span>            : 
<span class="lineNum">     149 </span>            : /*
<span class="lineNum">     150 </span>            : ** Try to convert a 'for' limit to an integer, preserving the semantics
<span class="lineNum">     151 </span>            : ** of the loop.  (The following explanation assumes a positive step;
<span class="lineNum">     152 </span>            : ** it is valid for negative steps mutatis mutandis.)
<span class="lineNum">     153 </span>            : ** Return true if the loop must not run.
<span class="lineNum">     154 </span>            : ** If the limit is an integer or can be converted to an integer,
<span class="lineNum">     155 </span>            : ** rounding down, that is the limit.
<span class="lineNum">     156 </span>            : ** Otherwise, check whether the limit can be converted to a float. If
<span class="lineNum">     157 </span>            : ** the float is too large, clip it to LUA_MAXINTEGER.  If the float
<span class="lineNum">     158 </span>            : ** is too negative, the loop should not run, because any initial
<span class="lineNum">     159 </span>            : ** integer value is greater than such limit; so, it returns true to
<span class="lineNum">     160 </span>            : ** signal that.
<span class="lineNum">     161 </span>            : ** (For this latter case, no integer limit would be correct; even a
<span class="lineNum">     162 </span>            : ** limit of LUA_MININTEGER would run the loop once for an initial
<span class="lineNum">     163 </span>            : ** value equal to LUA_MININTEGER.)
<span class="lineNum">     164 </span>            : */
<span class="lineNum">     165 </span><span class="lineCov">       4473 : static int forlimit (lua_State *L, lua_Integer init, const TValue *lim,</span>
<span class="lineNum">     166 </span>            :                                    lua_Integer *p, lua_Integer step) {
<span class="lineNum">     167 </span><span class="lineCov">       4473 :   if (!luaV_tointeger(lim, p, (step &lt; 0 ? 2 : 1))) {</span>
<span class="lineNum">     168 </span>            :     /* not coercible to in integer */
<span class="lineNum">     169 </span>            :     lua_Number flim;  /* try to convert to float */
<span class="lineNum">     170 </span><span class="lineCov">          1 :     if (!tonumber(lim, &amp;flim)) /* cannot convert to float? */</span>
<span class="lineNum">     171 </span><span class="lineCov">          1 :       luaG_forerror(L, lim, &quot;limit&quot;);</span>
<span class="lineNum">     172 </span>            :     /* else 'flim' is a float out of integer bounds */
<span class="lineNum">     173 </span><span class="lineNoCov">          0 :     if (luai_numlt(0, flim)) {  /* if it is positive, it is too large */</span>
<span class="lineNum">     174 </span><span class="lineNoCov">          0 :       if (step &lt; 0) return 1;  /* initial value must be less than it */</span>
<span class="lineNum">     175 </span><span class="lineNoCov">          0 :       *p = LUA_MAXINTEGER;  /* truncate */</span>
<span class="lineNum">     176 </span>            :     }
<span class="lineNum">     177 </span>            :     else {  /* it is less than min integer */
<span class="lineNum">     178 </span><span class="lineNoCov">          0 :       if (step &gt; 0) return 1;  /* initial value must be greater than it */</span>
<span class="lineNum">     179 </span><span class="lineNoCov">          0 :       *p = LUA_MININTEGER;  /* truncate */</span>
<span class="lineNum">     180 </span>            :     }
<span class="lineNum">     181 </span>            :   }
<span class="lineNum">     182 </span><span class="lineCov">       4472 :   return (step &gt; 0 ? init &gt; *p : init &lt; *p);  /* not to run? */</span>
<span class="lineNum">     183 </span>            : }
<span class="lineNum">     184 </span>            : 
<span class="lineNum">     185 </span>            : 
<span class="lineNum">     186 </span>            : /*
<span class="lineNum">     187 </span>            : ** Finish the table access 'val = t[key]'.
<span class="lineNum">     188 </span>            : ** if 'slot' is NULL, 't' is not a table; otherwise, 'slot' points to
<span class="lineNum">     189 </span>            : ** t[k] entry (which must be empty).
<span class="lineNum">     190 </span>            : */
<span class="lineNum">     191 </span><span class="lineCov">      15161 : void luaV_finishget (lua_State *L, const TValue *t, TValue *key, StkId val,</span>
<span class="lineNum">     192 </span>            :                       const TValue *slot) {
<span class="lineNum">     193 </span>            :   int loop;  /* counter to avoid infinite loops */
<span class="lineNum">     194 </span>            :   const TValue *tm;  /* metamethod */
<span class="lineNum">     195 </span><span class="lineCov">      15172 :   for (loop = 0; loop &lt; MAXTAGLOOP; loop++) {</span>
<span class="lineNum">     196 </span><span class="lineCov">      15172 :     if (slot == NULL) {  /* 't' is not a table? */</span>
<span class="lineNum">     197 </span>            :       lua_assert(!ttistable(t));
<span class="lineNum">     198 </span><span class="lineCov">       7342 :       tm = luaT_gettmbyobj(L, t, TM_INDEX);</span>
<span class="lineNum">     199 </span><span class="lineCov">       7342 :       if (unlikely(notm(tm)))</span>
<span class="lineNum">     200 </span><span class="lineCov">          6 :         luaG_typeerror(L, t, &quot;index&quot;);  /* no metamethod */</span>
<span class="lineNum">     201 </span>            :       /* else will try the metamethod */
<span class="lineNum">     202 </span>            :     }
<span class="lineNum">     203 </span>            :     else {  /* 't' is a table */
<span class="lineNum">     204 </span>            :       lua_assert(isempty(slot));
<span class="lineNum">     205 </span><span class="lineCov">       7830 :       tm = fasttm(L, hvalue(t)-&gt;metatable, TM_INDEX);  /* table's metamethod */</span>
<span class="lineNum">     206 </span><span class="lineCov">       7830 :       if (tm == NULL) {  /* no metamethod? */</span>
<span class="lineNum">     207 </span><span class="lineCov">       7796 :         setnilvalue(s2v(val));  /* result is nil */</span>
<span class="lineNum">     208 </span><span class="lineCov">       7796 :         return;</span>
<span class="lineNum">     209 </span>            :       }
<span class="lineNum">     210 </span>            :       /* else will try the metamethod */
<span class="lineNum">     211 </span>            :     }
<span class="lineNum">     212 </span><span class="lineCov">       7370 :     if (ttisfunction(tm)) {  /* is metamethod a function? */</span>
<span class="lineNum">     213 </span><span class="lineCov">         12 :       luaT_callTMres(L, tm, t, key, val);  /* call it */</span>
<span class="lineNum">     214 </span><span class="lineCov">         12 :       return;</span>
<span class="lineNum">     215 </span>            :     }
<span class="lineNum">     216 </span><span class="lineCov">       7358 :     t = tm;  /* else try to access 'tm[key]' */</span>
<span class="lineNum">     217 </span><span class="lineCov">       7358 :     if (luaV_fastget(L, t, key, slot, luaH_get)) {  /* fast track? */</span>
<span class="lineNum">     218 </span><span class="lineCov">       7347 :       setobj2s(L, val, slot);  /* done */</span>
<span class="lineNum">     219 </span><span class="lineCov">       7347 :       return;</span>
<span class="lineNum">     220 </span>            :     }
<span class="lineNum">     221 </span>            :     /* else repeat (tail call 'luaV_finishget') */
<span class="lineNum">     222 </span>            :   }
<span class="lineNum">     223 </span><span class="lineNoCov">          0 :   luaG_runerror(L, &quot;'__index' chain too long; possible loop&quot;);</span>
<span class="lineNum">     224 </span>            : }
<span class="lineNum">     225 </span>            : 
<span class="lineNum">     226 </span>            : 
<span class="lineNum">     227 </span>            : /*
<span class="lineNum">     228 </span>            : ** Finish a table assignment 't[key] = val'.
<span class="lineNum">     229 </span>            : ** If 'slot' is NULL, 't' is not a table.  Otherwise, 'slot' points
<span class="lineNum">     230 </span>            : ** to the entry 't[key]', or to a value with an absent key if there
<span class="lineNum">     231 </span>            : ** is no such entry.  (The value at 'slot' must be empty, otherwise
<span class="lineNum">     232 </span>            : ** 'luaV_fastget' would have done the job.)
<span class="lineNum">     233 </span>            : */
<span class="lineNum">     234 </span><span class="lineCov">      60451 : void luaV_finishset (lua_State *L, const TValue *t, TValue *key,</span>
<span class="lineNum">     235 </span>            :                      TValue *val, const TValue *slot) {
<span class="lineNum">     236 </span>            :   int loop;  /* counter to avoid infinite loops */
<span class="lineNum">     237 </span><span class="lineCov">      60452 :   for (loop = 0; loop &lt; MAXTAGLOOP; loop++) {</span>
<span class="lineNum">     238 </span>            :     const TValue *tm;  /* '__newindex' metamethod */
<span class="lineNum">     239 </span><span class="lineCov">      60452 :     if (slot != NULL) {  /* is 't' a table? */</span>
<span class="lineNum">     240 </span><span class="lineCov">      60444 :       Table *h = hvalue(t);  /* save 't' table */</span>
<span class="lineNum">     241 </span>            :       lua_assert(isempty(slot));  /* slot must be empty */
<span class="lineNum">     242 </span><span class="lineCov">      60444 :       tm = fasttm(L, h-&gt;metatable, TM_NEWINDEX);  /* get metamethod */</span>
<span class="lineNum">     243 </span><span class="lineCov">      60444 :       if (tm == NULL) {  /* no metamethod? */</span>
<span class="lineNum">     244 </span><span class="lineCov">      60439 :         if (isabstkey(slot))  /* no previous entry? */</span>
<span class="lineNum">     245 </span><span class="lineCov">      42686 :           slot = luaH_newkey(L, h, key);  /* create one */</span>
<span class="lineNum">     246 </span>            :         /* no metamethod and (now) there is an entry with given key */
<span class="lineNum">     247 </span><span class="lineCov">      60437 :         setobj2t(L, cast(TValue *, slot), val);  /* set its new value */</span>
<span class="lineNum">     248 </span><span class="lineCov">      60437 :         invalidateTMcache(h);</span>
<span class="lineNum">     249 </span><span class="lineCov">      60437 :         luaC_barrierback(L, obj2gco(h), val);</span>
<span class="lineNum">     250 </span><span class="lineCov">      60437 :         return;</span>
<span class="lineNum">     251 </span>            :       }
<span class="lineNum">     252 </span>            :       /* else will try the metamethod */
<span class="lineNum">     253 </span>            :     }
<span class="lineNum">     254 </span>            :     else {  /* not a table; check metamethod */
<span class="lineNum">     255 </span><span class="lineCov">          8 :       tm = luaT_gettmbyobj(L, t, TM_NEWINDEX);</span>
<span class="lineNum">     256 </span><span class="lineCov">          8 :       if (unlikely(notm(tm)))</span>
<span class="lineNum">     257 </span><span class="lineCov">          8 :         luaG_typeerror(L, t, &quot;index&quot;);</span>
<span class="lineNum">     258 </span>            :     }
<span class="lineNum">     259 </span>            :     /* try the metamethod */
<span class="lineNum">     260 </span><span class="lineCov">          5 :     if (ttisfunction(tm)) {</span>
<span class="lineNum">     261 </span><span class="lineCov">          4 :       luaT_callTM(L, tm, t, key, val);</span>
<span class="lineNum">     262 </span><span class="lineCov">          2 :       return;</span>
<span class="lineNum">     263 </span>            :     }
<span class="lineNum">     264 </span><span class="lineCov">          1 :     t = tm;  /* else repeat assignment over 'tm' */</span>
<span class="lineNum">     265 </span><span class="lineCov">          1 :     if (luaV_fastget(L, t, key, slot, luaH_get)) {</span>
<span class="lineNum">     266 </span><span class="lineNoCov">          0 :       luaV_finishfastset(L, t, slot, val);</span>
<span class="lineNum">     267 </span><span class="lineNoCov">          0 :       return;  /* done */</span>
<span class="lineNum">     268 </span>            :     }
<span class="lineNum">     269 </span>            :     /* else 'return luaV_finishset(L, t, key, val, slot)' (loop) */
<span class="lineNum">     270 </span>            :   }
<span class="lineNum">     271 </span><span class="lineNoCov">          0 :   luaG_runerror(L, &quot;'__newindex' chain too long; possible loop&quot;);</span>
<span class="lineNum">     272 </span>            : }
<span class="lineNum">     273 </span>            : 
<span class="lineNum">     274 </span>            : 
<span class="lineNum">     275 </span>            : /*
<span class="lineNum">     276 </span>            : ** Compare two strings 'ls' x 'rs', returning an integer less-equal-
<span class="lineNum">     277 </span>            : ** -greater than zero if 'ls' is less-equal-greater than 'rs'.
<span class="lineNum">     278 </span>            : ** The code is a little tricky because it allows '\0' in the strings
<span class="lineNum">     279 </span>            : ** and it uses 'strcoll' (to respect locales) for each segments
<span class="lineNum">     280 </span>            : ** of the strings.
<span class="lineNum">     281 </span>            : */
<span class="lineNum">     282 </span><span class="lineCov">      91704 : static int l_strcmp (const TString *ls, const TString *rs) {</span>
<span class="lineNum">     283 </span><span class="lineCov">      91704 :   const char *l = getstr(ls);</span>
<span class="lineNum">     284 </span><span class="lineCov">      91704 :   size_t ll = tsslen(ls);</span>
<span class="lineNum">     285 </span><span class="lineCov">      91704 :   const char *r = getstr(rs);</span>
<span class="lineNum">     286 </span><span class="lineCov">      91704 :   size_t lr = tsslen(rs);</span>
<span class="lineNum">     287 </span><span class="lineCov">          1 :   for (;;) {  /* for each segment */</span>
<span class="lineNum">     288 </span><span class="lineCov">      91705 :     int temp = strcoll(l, r);</span>
<span class="lineNum">     289 </span><span class="lineCov">      91705 :     if (temp != 0)  /* not equal? */</span>
<span class="lineNum">     290 </span><span class="lineCov">      89045 :       return temp;  /* done */</span>
<span class="lineNum">     291 </span>            :     else {  /* strings are equal up to a '\0' */
<span class="lineNum">     292 </span><span class="lineCov">       2660 :       size_t len = strlen(l);  /* index of first '\0' in both strings */</span>
<span class="lineNum">     293 </span><span class="lineCov">       2660 :       if (len == lr)  /* 'rs' is finished? */</span>
<span class="lineNum">     294 </span><span class="lineCov">       2658 :         return (len == ll) ? 0 : 1;  /* check 'ls' */</span>
<span class="lineNum">     295 </span><span class="lineCov">          2 :       else if (len == ll)  /* 'ls' is finished? */</span>
<span class="lineNum">     296 </span><span class="lineCov">          1 :         return -1;  /* 'ls' is less than 'rs' ('rs' is not finished) */</span>
<span class="lineNum">     297 </span>            :       /* both strings longer than 'len'; go on comparing after the '\0' */
<span class="lineNum">     298 </span><span class="lineCov">          1 :       len++;</span>
<span class="lineNum">     299 </span><span class="lineCov">          1 :       l += len; ll -= len; r += len; lr -= len;</span>
<span class="lineNum">     300 </span>            :     }
<span class="lineNum">     301 </span>            :   }
<span class="lineNum">     302 </span>            : }
<span class="lineNum">     303 </span>            : 
<span class="lineNum">     304 </span>            : 
<span class="lineNum">     305 </span>            : /*
<span class="lineNum">     306 </span>            : ** Check whether integer 'i' is less than float 'f'. If 'i' has an
<span class="lineNum">     307 </span>            : ** exact representation as a float ('l_intfitsf'), compare numbers as
<span class="lineNum">     308 </span>            : ** floats. Otherwise, use the equivalence 'i &lt; f &lt;=&gt; i &lt; ceil(f)'.
<span class="lineNum">     309 </span>            : ** If 'ceil(f)' is out of integer range, either 'f' is greater than
<span class="lineNum">     310 </span>            : ** all integers or less than all integers.
<span class="lineNum">     311 </span>            : ** (The test with 'l_intfitsf' is only for performance; the else
<span class="lineNum">     312 </span>            : ** case is correct for all values, but it is slow due to the conversion
<span class="lineNum">     313 </span>            : ** from float to int.)
<span class="lineNum">     314 </span>            : ** When 'f' is NaN, comparisons must result in false.
<span class="lineNum">     315 </span>            : */
<span class="lineNum">     316 </span><span class="lineNoCov">          0 : static int LTintfloat (lua_Integer i, lua_Number f) {</span>
<span class="lineNum">     317 </span><span class="lineNoCov">          0 :   if (l_intfitsf(i))</span>
<span class="lineNum">     318 </span><span class="lineNoCov">          0 :     return luai_numlt(cast_num(i), f);  /* compare them as floats */</span>
<span class="lineNum">     319 </span>            :   else {  /* i &lt; f &lt;=&gt; i &lt; ceil(f) */
<span class="lineNum">     320 </span>            :     lua_Integer fi;
<span class="lineNum">     321 </span><span class="lineNoCov">          0 :     if (luaV_flttointeger(f, &amp;fi, 2))  /* fi = ceil(f) */</span>
<span class="lineNum">     322 </span><span class="lineNoCov">          0 :       return i &lt; fi;   /* compare them as integers */</span>
<span class="lineNum">     323 </span>            :     else  /* 'f' is either greater or less than all integers */
<span class="lineNum">     324 </span><span class="lineNoCov">          0 :       return f &gt; 0;  /* greater? */</span>
<span class="lineNum">     325 </span>            :   }
<span class="lineNum">     326 </span>            : }
<span class="lineNum">     327 </span>            : 
<span class="lineNum">     328 </span>            : 
<span class="lineNum">     329 </span>            : /*
<span class="lineNum">     330 </span>            : ** Check whether integer 'i' is less than or equal to float 'f'.
<span class="lineNum">     331 </span>            : ** See comments on previous function.
<span class="lineNum">     332 </span>            : */
<span class="lineNum">     333 </span><span class="lineNoCov">          0 : static int LEintfloat (lua_Integer i, lua_Number f) {</span>
<span class="lineNum">     334 </span><span class="lineNoCov">          0 :   if (l_intfitsf(i))</span>
<span class="lineNum">     335 </span><span class="lineNoCov">          0 :     return luai_numle(cast_num(i), f);  /* compare them as floats */</span>
<span class="lineNum">     336 </span>            :   else {  /* i &lt;= f &lt;=&gt; i &lt;= floor(f) */
<span class="lineNum">     337 </span>            :     lua_Integer fi;
<span class="lineNum">     338 </span><span class="lineNoCov">          0 :     if (luaV_flttointeger(f, &amp;fi, 1))  /* fi = floor(f) */</span>
<span class="lineNum">     339 </span><span class="lineNoCov">          0 :       return i &lt;= fi;   /* compare them as integers */</span>
<span class="lineNum">     340 </span>            :     else  /* 'f' is either greater or less than all integers */
<span class="lineNum">     341 </span><span class="lineNoCov">          0 :       return f &gt; 0;  /* greater? */</span>
<span class="lineNum">     342 </span>            :   }
<span class="lineNum">     343 </span>            : }
<span class="lineNum">     344 </span>            : 
<span class="lineNum">     345 </span>            : 
<span class="lineNum">     346 </span>            : /*
<span class="lineNum">     347 </span>            : ** Check whether float 'f' is less than integer 'i'.
<span class="lineNum">     348 </span>            : ** See comments on previous function.
<span class="lineNum">     349 </span>            : */
<span class="lineNum">     350 </span><span class="lineCov">          1 : static int LTfloatint (lua_Number f, lua_Integer i) {</span>
<span class="lineNum">     351 </span><span class="lineCov">          1 :   if (l_intfitsf(i))</span>
<span class="lineNum">     352 </span><span class="lineCov">          1 :     return luai_numlt(f, cast_num(i));  /* compare them as floats */</span>
<span class="lineNum">     353 </span>            :   else {  /* f &lt; i &lt;=&gt; floor(f) &lt; i */
<span class="lineNum">     354 </span>            :     lua_Integer fi;
<span class="lineNum">     355 </span><span class="lineNoCov">          0 :     if (luaV_flttointeger(f, &amp;fi, 1))  /* fi = floor(f) */</span>
<span class="lineNum">     356 </span><span class="lineNoCov">          0 :       return fi &lt; i;   /* compare them as integers */</span>
<span class="lineNum">     357 </span>            :     else  /* 'f' is either greater or less than all integers */
<span class="lineNum">     358 </span><span class="lineNoCov">          0 :       return f &lt; 0;  /* less? */</span>
<span class="lineNum">     359 </span>            :   }
<span class="lineNum">     360 </span>            : }
<span class="lineNum">     361 </span>            : 
<span class="lineNum">     362 </span>            : 
<span class="lineNum">     363 </span>            : /*
<span class="lineNum">     364 </span>            : ** Check whether float 'f' is less than or equal to integer 'i'.
<span class="lineNum">     365 </span>            : ** See comments on previous function.
<span class="lineNum">     366 </span>            : */
<span class="lineNum">     367 </span><span class="lineNoCov">          0 : static int LEfloatint (lua_Number f, lua_Integer i) {</span>
<span class="lineNum">     368 </span><span class="lineNoCov">          0 :   if (l_intfitsf(i))</span>
<span class="lineNum">     369 </span><span class="lineNoCov">          0 :     return luai_numle(f, cast_num(i));  /* compare them as floats */</span>
<span class="lineNum">     370 </span>            :   else {  /* f &lt;= i &lt;=&gt; ceil(f) &lt;= i */
<span class="lineNum">     371 </span>            :     lua_Integer fi;
<span class="lineNum">     372 </span><span class="lineNoCov">          0 :     if (luaV_flttointeger(f, &amp;fi, 2))  /* fi = ceil(f) */</span>
<span class="lineNum">     373 </span><span class="lineNoCov">          0 :       return fi &lt;= i;   /* compare them as integers */</span>
<span class="lineNum">     374 </span>            :     else  /* 'f' is either greater or less than all integers */
<span class="lineNum">     375 </span><span class="lineNoCov">          0 :       return f &lt; 0;  /* less? */</span>
<span class="lineNum">     376 </span>            :   }
<span class="lineNum">     377 </span>            : }
<span class="lineNum">     378 </span>            : 
<span class="lineNum">     379 </span>            : 
<span class="lineNum">     380 </span>            : /*
<span class="lineNum">     381 </span>            : ** Return 'l &lt; r', for numbers.
<span class="lineNum">     382 </span>            : */
<span class="lineNum">     383 </span><span class="lineCov">         12 : static int LTnum (const TValue *l, const TValue *r) {</span>
<span class="lineNum">     384 </span>            :   lua_assert(ttisnumber(l) &amp;&amp; ttisnumber(r));
<span class="lineNum">     385 </span><span class="lineCov">         12 :   if (ttisinteger(l)) {</span>
<span class="lineNum">     386 </span><span class="lineCov">          9 :     lua_Integer li = ivalue(l);</span>
<span class="lineNum">     387 </span><span class="lineCov">          9 :     if (ttisinteger(r))</span>
<span class="lineNum">     388 </span><span class="lineCov">          9 :       return li &lt; ivalue(r);  /* both are integers */</span>
<span class="lineNum">     389 </span>            :     else  /* 'l' is int and 'r' is float */
<span class="lineNum">     390 </span><span class="lineNoCov">          0 :       return LTintfloat(li, fltvalue(r));  /* l &lt; r ? */</span>
<span class="lineNum">     391 </span>            :   }
<span class="lineNum">     392 </span>            :   else {
<span class="lineNum">     393 </span><span class="lineCov">          3 :     lua_Number lf = fltvalue(l);  /* 'l' must be float */</span>
<span class="lineNum">     394 </span><span class="lineCov">          3 :     if (ttisfloat(r))</span>
<span class="lineNum">     395 </span><span class="lineCov">          2 :       return luai_numlt(lf, fltvalue(r));  /* both are float */</span>
<span class="lineNum">     396 </span>            :     else  /* 'l' is float and 'r' is int */
<span class="lineNum">     397 </span><span class="lineCov">          1 :       return LTfloatint(lf, ivalue(r));</span>
<span class="lineNum">     398 </span>            :   }
<span class="lineNum">     399 </span>            : }
<span class="lineNum">     400 </span>            : 
<span class="lineNum">     401 </span>            : 
<span class="lineNum">     402 </span>            : /*
<span class="lineNum">     403 </span>            : ** Return 'l &lt;= r', for numbers.
<span class="lineNum">     404 </span>            : */
<span class="lineNum">     405 </span><span class="lineCov">          2 : static int LEnum (const TValue *l, const TValue *r) {</span>
<span class="lineNum">     406 </span>            :   lua_assert(ttisnumber(l) &amp;&amp; ttisnumber(r));
<span class="lineNum">     407 </span><span class="lineCov">          2 :   if (ttisinteger(l)) {</span>
<span class="lineNum">     408 </span><span class="lineNoCov">          0 :     lua_Integer li = ivalue(l);</span>
<span class="lineNum">     409 </span><span class="lineNoCov">          0 :     if (ttisinteger(r))</span>
<span class="lineNum">     410 </span><span class="lineNoCov">          0 :       return li &lt;= ivalue(r);  /* both are integers */</span>
<span class="lineNum">     411 </span>            :     else  /* 'l' is int and 'r' is float */
<span class="lineNum">     412 </span><span class="lineNoCov">          0 :       return LEintfloat(li, fltvalue(r));  /* l &lt;= r ? */</span>
<span class="lineNum">     413 </span>            :   }
<span class="lineNum">     414 </span>            :   else {
<span class="lineNum">     415 </span><span class="lineCov">          2 :     lua_Number lf = fltvalue(l);  /* 'l' must be float */</span>
<span class="lineNum">     416 </span><span class="lineCov">          2 :     if (ttisfloat(r))</span>
<span class="lineNum">     417 </span><span class="lineCov">          2 :       return luai_numle(lf, fltvalue(r));  /* both are float */</span>
<span class="lineNum">     418 </span>            :     else  /* 'l' is float and 'r' is int */
<span class="lineNum">     419 </span><span class="lineNoCov">          0 :       return LEfloatint(lf, ivalue(r));</span>
<span class="lineNum">     420 </span>            :   }
<span class="lineNum">     421 </span>            : }
<span class="lineNum">     422 </span>            : 
<span class="lineNum">     423 </span>            : 
<span class="lineNum">     424 </span>            : /*
<span class="lineNum">     425 </span>            : ** return 'l &lt; r' for non-numbers.
<span class="lineNum">     426 </span>            : */
<span class="lineNum">     427 </span><span class="lineCov">      91642 : static int lessthanothers (lua_State *L, const TValue *l, const TValue *r) {</span>
<span class="lineNum">     428 </span>            :   lua_assert(!ttisnumber(l) || !ttisnumber(r));
<span class="lineNum">     429 </span><span class="lineCov">      91642 :   if (ttisstring(l) &amp;&amp; ttisstring(r))  /* both are strings? */</span>
<span class="lineNum">     430 </span><span class="lineCov">      91621 :     return l_strcmp(tsvalue(l), tsvalue(r)) &lt; 0;</span>
<span class="lineNum">     431 </span>            :   else
<span class="lineNum">     432 </span><span class="lineCov">         21 :     return luaT_callorderTM(L, l, r, TM_LT);</span>
<span class="lineNum">     433 </span>            : }
<span class="lineNum">     434 </span>            : 
<span class="lineNum">     435 </span>            : 
<span class="lineNum">     436 </span>            : /*
<span class="lineNum">     437 </span>            : ** Main operation less than; return 'l &lt; r'.
<span class="lineNum">     438 </span>            : */
<span class="lineNum">     439 </span><span class="lineCov">      91623 : int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {</span>
<span class="lineNum">     440 </span><span class="lineCov">      91623 :   if (ttisnumber(l) &amp;&amp; ttisnumber(r))  /* both operands are numbers? */</span>
<span class="lineNum">     441 </span><span class="lineCov">         12 :     return LTnum(l, r);</span>
<span class="lineNum">     442 </span><span class="lineCov">      91611 :   else return lessthanothers(L, l, r);</span>
<span class="lineNum">     443 </span>            : }
<span class="lineNum">     444 </span>            : 
<span class="lineNum">     445 </span>            : 
<span class="lineNum">     446 </span>            : /*
<span class="lineNum">     447 </span>            : ** return 'l &lt;= r' for non-numbers.
<span class="lineNum">     448 </span>            : ** If it needs a metamethod and there is no '__le', try '__lt', based
<span class="lineNum">     449 </span>            : ** on l &lt;= r iff !(r &lt; l) (assuming a total order). If the metamethod
<span class="lineNum">     450 </span>            : ** yields during this substitution, the continuation has to know about
<span class="lineNum">     451 </span>            : ** it (to negate the result of r&lt;l); bit CIST_LEQ in the call status
<span class="lineNum">     452 </span>            : ** keeps that information.
<span class="lineNum">     453 </span>            : */
<span class="lineNum">     454 </span><span class="lineCov">        100 : static int lessequalothers (lua_State *L, const TValue *l, const TValue *r) {</span>
<span class="lineNum">     455 </span>            :   lua_assert(!ttisnumber(l) || !ttisnumber(r));
<span class="lineNum">     456 </span><span class="lineCov">        100 :   if (ttisstring(l) &amp;&amp; ttisstring(r))  /* both are strings? */</span>
<span class="lineNum">     457 </span><span class="lineCov">         83 :     return l_strcmp(tsvalue(l), tsvalue(r)) &lt;= 0;</span>
<span class="lineNum">     458 </span>            :   else
<span class="lineNum">     459 </span><span class="lineCov">         17 :     return luaT_callorderTM(L, l, r, TM_LE);</span>
<span class="lineNum">     460 </span>            : }
<span class="lineNum">     461 </span>            : 
<span class="lineNum">     462 </span>            : 
<span class="lineNum">     463 </span>            : /*
<span class="lineNum">     464 </span>            : ** Main operation less than or equal to; return 'l &lt;= r'.
<span class="lineNum">     465 </span>            : */
<span class="lineNum">     466 </span><span class="lineNoCov">          0 : int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {</span>
<span class="lineNum">     467 </span><span class="lineNoCov">          0 :   if (ttisnumber(l) &amp;&amp; ttisnumber(r))  /* both operands are numbers? */</span>
<span class="lineNum">     468 </span><span class="lineNoCov">          0 :     return LEnum(l, r);</span>
<span class="lineNum">     469 </span><span class="lineNoCov">          0 :   else return lessequalothers(L, l, r);</span>
<span class="lineNum">     470 </span>            : }
<span class="lineNum">     471 </span>            : 
<span class="lineNum">     472 </span>            : 
<span class="lineNum">     473 </span>            : /*
<span class="lineNum">     474 </span>            : ** Main operation for equality of Lua values; return 't1 == t2'.
<span class="lineNum">     475 </span>            : ** L == NULL means raw equality (no metamethods)
<span class="lineNum">     476 </span>            : */
<span class="lineNum">     477 </span><span class="lineCov">      37341 : int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2) {</span>
<span class="lineNum">     478 </span>            :   const TValue *tm;
<span class="lineNum">     479 </span><span class="lineCov">      37341 :   if (ttypetag(t1) != ttypetag(t2)) {  /* not the same variant? */</span>
<span class="lineNum">     480 </span><span class="lineCov">       1636 :     if (ttype(t1) != ttype(t2) || ttype(t1) != LUA_TNUMBER)</span>
<span class="lineNum">     481 </span><span class="lineCov">       1610 :       return 0;  /* only numbers can be equal with different variants */</span>
<span class="lineNum">     482 </span>            :     else {  /* two numbers with different variants */
<span class="lineNum">     483 </span>            :       lua_Integer i1, i2;  /* compare them as integers */
<span class="lineNum">     484 </span><span class="lineCov">         26 :       return (tointegerns(t1, &amp;i1) &amp;&amp; tointegerns(t2, &amp;i2) &amp;&amp; i1 == i2);</span>
<span class="lineNum">     485 </span>            :     }
<span class="lineNum">     486 </span>            :   }
<span class="lineNum">     487 </span>            :   /* values have same type and same variant */
<span class="lineNum">     488 </span><span class="lineCov">      35705 :   switch (ttypetag(t1)) {</span>
<span class="lineNum">     489 </span><span class="lineCov">        161 :     case LUA_TNIL: return 1;</span>
<span class="lineNum">     490 </span><span class="lineCov">        546 :     case LUA_TNUMINT: return (ivalue(t1) == ivalue(t2));</span>
<span class="lineNum">     491 </span><span class="lineCov">         69 :     case LUA_TNUMFLT: return luai_numeq(fltvalue(t1), fltvalue(t2));</span>
<span class="lineNum">     492 </span><span class="lineCov">        222 :     case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2);  /* true must be 1! */</span>
<span class="lineNum">     493 </span><span class="lineNoCov">          0 :     case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2);</span>
<span class="lineNum">     494 </span><span class="lineCov">        998 :     case LUA_TLCF: return fvalue(t1) == fvalue(t2);</span>
<span class="lineNum">     495 </span><span class="lineCov">      32071 :     case LUA_TSHRSTR: return eqshrstr(tsvalue(t1), tsvalue(t2));</span>
<span class="lineNum">     496 </span><span class="lineCov">        181 :     case LUA_TLNGSTR: return luaS_eqlngstr(tsvalue(t1), tsvalue(t2));</span>
<span class="lineNum">     497 </span><span class="lineCov">          9 :     case LUA_TUSERDATA: {</span>
<span class="lineNum">     498 </span><span class="lineCov">          9 :       if (uvalue(t1) == uvalue(t2)) return 1;</span>
<span class="lineNum">     499 </span><span class="lineCov">          1 :       else if (L == NULL) return 0;</span>
<span class="lineNum">     500 </span><span class="lineCov">          1 :       tm = fasttm(L, uvalue(t1)-&gt;metatable, TM_EQ);</span>
<span class="lineNum">     501 </span><span class="lineCov">          1 :       if (tm == NULL)</span>
<span class="lineNum">     502 </span><span class="lineCov">          1 :         tm = fasttm(L, uvalue(t2)-&gt;metatable, TM_EQ);</span>
<span class="lineNum">     503 </span><span class="lineCov">          1 :       break;  /* will try TM */</span>
<span class="lineNum">     504 </span>            :     }
<span class="lineNum">     505 </span><span class="lineCov">       1381 :     case LUA_TTABLE: {</span>
<span class="lineNum">     506 </span><span class="lineCov">       1381 :       if (hvalue(t1) == hvalue(t2)) return 1;</span>
<span class="lineNum">     507 </span><span class="lineCov">         11 :       else if (L == NULL) return 0;</span>
<span class="lineNum">     508 </span><span class="lineCov">         10 :       tm = fasttm(L, hvalue(t1)-&gt;metatable, TM_EQ);</span>
<span class="lineNum">     509 </span><span class="lineCov">         10 :       if (tm == NULL)</span>
<span class="lineNum">     510 </span><span class="lineCov">          5 :         tm = fasttm(L, hvalue(t2)-&gt;metatable, TM_EQ);</span>
<span class="lineNum">     511 </span><span class="lineCov">         10 :       break;  /* will try TM */</span>
<span class="lineNum">     512 </span>            :     }
<span class="lineNum">     513 </span><span class="lineCov">         67 :     default:</span>
<span class="lineNum">     514 </span><span class="lineCov">         67 :       return gcvalue(t1) == gcvalue(t2);</span>
<span class="lineNum">     515 </span>            :   }
<span class="lineNum">     516 </span><span class="lineCov">         11 :   if (tm == NULL)  /* no TM? */</span>
<span class="lineNum">     517 </span><span class="lineCov">          6 :     return 0;  /* objects are different */</span>
<span class="lineNum">     518 </span><span class="lineCov">          5 :   luaT_callTMres(L, tm, t1, t2, L-&gt;top);  /* call TM */</span>
<span class="lineNum">     519 </span><span class="lineCov">          2 :   return !l_isfalse(s2v(L-&gt;top));</span>
<span class="lineNum">     520 </span>            : }
<span class="lineNum">     521 </span>            : 
<span class="lineNum">     522 </span>            : 
<span class="lineNum">     523 </span>            : /* macro used by 'luaV_concat' to ensure that element at 'o' is a string */
<span class="lineNum">     524 </span>            : #define tostring(L,o)  \
<span class="lineNum">     525 </span>            :         (ttisstring(o) || (cvt2str(o) &amp;&amp; (luaO_tostring(L, o), 1)))
<span class="lineNum">     526 </span>            : 
<span class="lineNum">     527 </span>            : #define isemptystr(o)   (ttisshrstring(o) &amp;&amp; tsvalue(o)-&gt;shrlen == 0)
<span class="lineNum">     528 </span>            : 
<span class="lineNum">     529 </span>            : /* copy strings in stack from top - n up to top - 1 to buffer */
<span class="lineNum">     530 </span><span class="lineCov">       7866 : static void copy2buff (StkId top, int n, char *buff) {</span>
<span class="lineNum">     531 </span><span class="lineCov">       7866 :   size_t tl = 0;  /* size already copied */</span>
<span class="lineNum">     532 </span>            :   do {
<span class="lineNum">     533 </span><span class="lineCov">      19428 :     size_t l = vslen(s2v(top - n));  /* length of string being copied */</span>
<span class="lineNum">     534 </span><span class="lineCov">      19428 :     memcpy(buff + tl, svalue(s2v(top - n)), l * sizeof(char));</span>
<span class="lineNum">     535 </span><span class="lineCov">      19428 :     tl += l;</span>
<span class="lineNum">     536 </span><span class="lineCov">      19428 :   } while (--n &gt; 0);</span>
<span class="lineNum">     537 </span><span class="lineCov">       7866 : }</span>
<span class="lineNum">     538 </span>            : 
<span class="lineNum">     539 </span>            : 
<span class="lineNum">     540 </span>            : /*
<span class="lineNum">     541 </span>            : ** Main operation for concatenation: concat 'total' values in the stack,
<span class="lineNum">     542 </span>            : ** from 'L-&gt;top - total' up to 'L-&gt;top - 1'.
<span class="lineNum">     543 </span>            : */
<span class="lineNum">     544 </span><span class="lineCov">       8631 : void luaV_concat (lua_State *L, int total) {</span>
<span class="lineNum">     545 </span>            :   lua_assert(total &gt;= 2);
<span class="lineNum">     546 </span>            :   do {
<span class="lineNum">     547 </span><span class="lineCov">       8631 :     StkId top = L-&gt;top;</span>
<span class="lineNum">     548 </span><span class="lineCov">       8631 :     int n = 2;  /* number of elements handled in this pass (at least 2) */</span>
<span class="lineNum">     549 </span><span class="lineCov">       8631 :     if (!(ttisstring(s2v(top - 2)) || cvt2str(s2v(top - 2))) ||</span>
<span class="lineNum">     550 </span><span class="lineCov">       8621 :         !tostring(L, s2v(top - 1)))</span>
<span class="lineNum">     551 </span><span class="lineCov">         12 :       luaT_trybinTM(L, s2v(top - 2), s2v(top - 1), top - 2, TM_CONCAT);</span>
<span class="lineNum">     552 </span><span class="lineCov">       8619 :     else if (isemptystr(s2v(top - 1)))  /* second operand is empty? */</span>
<span class="lineNum">     553 </span><span class="lineCov">         50 :       cast_void(tostring(L, s2v(top - 2)));  /* result is first operand */</span>
<span class="lineNum">     554 </span><span class="lineCov">       8569 :     else if (isemptystr(s2v(top - 2))) {  /* first operand is empty string? */</span>
<span class="lineNum">     555 </span><span class="lineCov">        703 :       setobjs2s(L, top - 2, top - 1);  /* result is second op. */</span>
<span class="lineNum">     556 </span>            :     }
<span class="lineNum">     557 </span>            :     else {
<span class="lineNum">     558 </span>            :       /* at least two non-empty string values; get as many as possible */
<span class="lineNum">     559 </span><span class="lineCov">       7866 :       size_t tl = vslen(s2v(top - 1));</span>
<span class="lineNum">     560 </span>            :       TString *ts;
<span class="lineNum">     561 </span>            :       /* collect total length and number of strings */
<span class="lineNum">     562 </span><span class="lineCov">      19428 :       for (n = 1; n &lt; total &amp;&amp; tostring(L, s2v(top - n - 1)); n++) {</span>
<span class="lineNum">     563 </span><span class="lineCov">      11562 :         size_t l = vslen(s2v(top - n - 1));</span>
<span class="lineNum">     564 </span><span class="lineCov">      11562 :         if (unlikely(l &gt;= (MAX_SIZE/sizeof(char)) - tl))</span>
<span class="lineNum">     565 </span><span class="lineNoCov">          0 :           luaG_runerror(L, &quot;string length overflow&quot;);</span>
<span class="lineNum">     566 </span><span class="lineCov">      11562 :         tl += l;</span>
<span class="lineNum">     567 </span>            :       }
<span class="lineNum">     568 </span><span class="lineCov">       7866 :       if (tl &lt;= LUAI_MAXSHORTLEN) {  /* is result a short string? */</span>
<span class="lineNum">     569 </span>            :         char buff[LUAI_MAXSHORTLEN];
<span class="lineNum">     570 </span><span class="lineCov">       7431 :         copy2buff(top, n, buff);  /* copy strings to buffer */</span>
<span class="lineNum">     571 </span><span class="lineCov">       7431 :         ts = luaS_newlstr(L, buff, tl);</span>
<span class="lineNum">     572 </span>            :       }
<span class="lineNum">     573 </span>            :       else {  /* long string; copy strings directly to final result */
<span class="lineNum">     574 </span><span class="lineCov">        435 :         ts = luaS_createlngstrobj(L, tl);</span>
<span class="lineNum">     575 </span><span class="lineCov">        435 :         copy2buff(top, n, getstr(ts));</span>
<span class="lineNum">     576 </span>            :       }
<span class="lineNum">     577 </span><span class="lineCov">       7866 :       setsvalue2s(L, top - n, ts);  /* create result */</span>
<span class="lineNum">     578 </span>            :     }
<span class="lineNum">     579 </span><span class="lineCov">       8622 :     total -= n-1;  /* got 'n' strings to create 1 new */</span>
<span class="lineNum">     580 </span><span class="lineCov">       8622 :     L-&gt;top -= n-1;  /* popped 'n' strings and pushed one */</span>
<span class="lineNum">     581 </span><span class="lineCov">       8622 :   } while (total &gt; 1);  /* repeat until only 1 result left */</span>
<span class="lineNum">     582 </span><span class="lineCov">       8570 : }</span>
<span class="lineNum">     583 </span>            : 
<span class="lineNum">     584 </span>            : 
<span class="lineNum">     585 </span>            : /*
<span class="lineNum">     586 </span>            : ** Main operation 'ra = #rb'.
<span class="lineNum">     587 </span>            : */
<span class="lineNum">     588 </span><span class="lineCov">      18776 : void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {</span>
<span class="lineNum">     589 </span>            :   const TValue *tm;
<span class="lineNum">     590 </span><span class="lineCov">      18776 :   switch (ttypetag(rb)) {</span>
<span class="lineNum">     591 </span><span class="lineCov">      18768 :     case LUA_TTABLE: {</span>
<span class="lineNum">     592 </span><span class="lineCov">      18768 :       Table *h = hvalue(rb);</span>
<span class="lineNum">     593 </span><span class="lineCov">      18768 :       tm = fasttm(L, h-&gt;metatable, TM_LEN);</span>
<span class="lineNum">     594 </span><span class="lineCov">      18768 :       if (tm) break;  /* metamethod? break switch to call it */</span>
<span class="lineNum">     595 </span><span class="lineCov">      18765 :       setivalue(s2v(ra), luaH_getn(h));  /* else primitive len */</span>
<span class="lineNum">     596 </span><span class="lineCov">      18765 :       return;</span>
<span class="lineNum">     597 </span>            :     }
<span class="lineNum">     598 </span><span class="lineCov">          2 :     case LUA_TSHRSTR: {</span>
<span class="lineNum">     599 </span><span class="lineCov">          2 :       setivalue(s2v(ra), tsvalue(rb)-&gt;shrlen);</span>
<span class="lineNum">     600 </span><span class="lineCov">          2 :       return;</span>
<span class="lineNum">     601 </span>            :     }
<span class="lineNum">     602 </span><span class="lineNoCov">          0 :     case LUA_TLNGSTR: {</span>
<span class="lineNum">     603 </span><span class="lineNoCov">          0 :       setivalue(s2v(ra), tsvalue(rb)-&gt;u.lnglen);</span>
<span class="lineNum">     604 </span><span class="lineNoCov">          0 :       return;</span>
<span class="lineNum">     605 </span>            :     }
<span class="lineNum">     606 </span><span class="lineCov">          6 :     default: {  /* try metamethod */</span>
<span class="lineNum">     607 </span><span class="lineCov">          6 :       tm = luaT_gettmbyobj(L, rb, TM_LEN);</span>
<span class="lineNum">     608 </span><span class="lineCov">          6 :       if (unlikely(notm(tm)))  /* no metamethod? */</span>
<span class="lineNum">     609 </span><span class="lineCov">          6 :         luaG_typeerror(L, rb, &quot;get length of&quot;);</span>
<span class="lineNum">     610 </span><span class="lineNoCov">          0 :       break;</span>
<span class="lineNum">     611 </span>            :     }
<span class="lineNum">     612 </span>            :   }
<span class="lineNum">     613 </span><span class="lineCov">          3 :   luaT_callTMres(L, tm, rb, rb, ra);</span>
<span class="lineNum">     614 </span>            : }
<span class="lineNum">     615 </span>            : 
<span class="lineNum">     616 </span>            : 
<span class="lineNum">     617 </span>            : /*
<span class="lineNum">     618 </span>            : ** Integer division; return 'm // n', that is, floor(m/n).
<span class="lineNum">     619 </span>            : ** C division truncates its result (rounds towards zero).
<span class="lineNum">     620 </span>            : ** 'floor(q) == trunc(q)' when 'q &gt;= 0' or when 'q' is integer,
<span class="lineNum">     621 </span>            : ** otherwise 'floor(q) == trunc(q) - 1'.
<span class="lineNum">     622 </span>            : */
<span class="lineNum">     623 </span><span class="lineCov">          7 : lua_Integer luaV_idiv (lua_State *L, lua_Integer m, lua_Integer n) {</span>
<span class="lineNum">     624 </span><span class="lineCov">          7 :   if (unlikely(l_castS2U(n) + 1u &lt;= 1u)) {  /* special cases: -1 or 0 */</span>
<span class="lineNum">     625 </span><span class="lineCov">          2 :     if (n == 0)</span>
<span class="lineNum">     626 </span><span class="lineCov">          1 :       luaG_runerror(L, &quot;attempt to divide by zero&quot;);</span>
<span class="lineNum">     627 </span><span class="lineCov">          1 :     return intop(-, 0, m);   /* n==-1; avoid overflow with 0x80000...//-1 */</span>
<span class="lineNum">     628 </span>            :   }
<span class="lineNum">     629 </span>            :   else {
<span class="lineNum">     630 </span><span class="lineCov">          5 :     lua_Integer q = m / n;  /* perform C division */</span>
<span class="lineNum">     631 </span><span class="lineCov">          5 :     if ((m ^ n) &lt; 0 &amp;&amp; m % n != 0)  /* 'm/n' would be negative non-integer? */</span>
<span class="lineNum">     632 </span><span class="lineCov">          1 :       q -= 1;  /* correct result for different rounding */</span>
<span class="lineNum">     633 </span><span class="lineCov">          5 :     return q;</span>
<span class="lineNum">     634 </span>            :   }
<span class="lineNum">     635 </span>            : }
<span class="lineNum">     636 </span>            : 
<span class="lineNum">     637 </span>            : 
<span class="lineNum">     638 </span>            : /*
<span class="lineNum">     639 </span>            : ** Integer modulus; return 'm % n'. (Assume that C '%' with
<span class="lineNum">     640 </span>            : ** negative operands follows C99 behavior. See previous comment
<span class="lineNum">     641 </span>            : ** about luaV_idiv.)
<span class="lineNum">     642 </span>            : */
<span class="lineNum">     643 </span><span class="lineCov">          5 : lua_Integer luaV_mod (lua_State *L, lua_Integer m, lua_Integer n) {</span>
<span class="lineNum">     644 </span><span class="lineCov">          5 :   if (unlikely(l_castS2U(n) + 1u &lt;= 1u)) {  /* special cases: -1 or 0 */</span>
<span class="lineNum">     645 </span><span class="lineCov">          1 :     if (n == 0)</span>
<span class="lineNum">     646 </span><span class="lineCov">          1 :       luaG_runerror(L, &quot;attempt to perform 'n%%0'&quot;);</span>
<span class="lineNum">     647 </span><span class="lineNoCov">          0 :     return 0;   /* m % -1 == 0; avoid overflow with 0x80000...%-1 */</span>
<span class="lineNum">     648 </span>            :   }
<span class="lineNum">     649 </span>            :   else {
<span class="lineNum">     650 </span><span class="lineCov">          4 :     lua_Integer r = m % n;</span>
<span class="lineNum">     651 </span><span class="lineCov">          4 :     if (r != 0 &amp;&amp; (r ^ n) &lt; 0)  /* 'm/n' would be non-integer negative? */</span>
<span class="lineNum">     652 </span><span class="lineCov">          4 :       r += n;  /* correct result for different rounding */</span>
<span class="lineNum">     653 </span><span class="lineCov">          4 :     return r;</span>
<span class="lineNum">     654 </span>            :   }
<span class="lineNum">     655 </span>            : }
<span class="lineNum">     656 </span>            : 
<span class="lineNum">     657 </span>            : 
<span class="lineNum">     658 </span>            : /*
<span class="lineNum">     659 </span>            : ** Float modulus
<span class="lineNum">     660 </span>            : */
<span class="lineNum">     661 </span><span class="lineCov">          2 : lua_Number luaV_modf (lua_State *L, lua_Number m, lua_Number n) {</span>
<span class="lineNum">     662 </span>            :   lua_Number r;
<span class="lineNum">     663 </span><span class="lineCov">          2 :   luai_nummod(L, m, n, r);</span>
<span class="lineNum">     664 </span><span class="lineCov">          2 :   return r;</span>
<span class="lineNum">     665 </span>            : }
<span class="lineNum">     666 </span>            : 
<span class="lineNum">     667 </span>            : 
<span class="lineNum">     668 </span>            : /* number of bits in an integer */
<span class="lineNum">     669 </span>            : #define NBITS   cast_int(sizeof(lua_Integer) * CHAR_BIT)
<span class="lineNum">     670 </span>            : 
<span class="lineNum">     671 </span>            : /*
<span class="lineNum">     672 </span>            : ** Shift left operation. (Shift right just negates 'y'.)
<span class="lineNum">     673 </span>            : */
<span class="lineNum">     674 </span><span class="lineCov">          2 : lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) {</span>
<span class="lineNum">     675 </span><span class="lineCov">          2 :   if (y &lt; 0) {  /* shift right? */</span>
<span class="lineNum">     676 </span><span class="lineCov">          1 :     if (y &lt;= -NBITS) return 0;</span>
<span class="lineNum">     677 </span><span class="lineCov">          1 :     else return intop(&gt;&gt;, x, -y);</span>
<span class="lineNum">     678 </span>            :   }
<span class="lineNum">     679 </span>            :   else {  /* shift left */
<span class="lineNum">     680 </span><span class="lineCov">          1 :     if (y &gt;= NBITS) return 0;</span>
<span class="lineNum">     681 </span><span class="lineCov">          1 :     else return intop(&lt;&lt;, x, y);</span>
<span class="lineNum">     682 </span>            :   }
<span class="lineNum">     683 </span>            : }
<span class="lineNum">     684 </span>            : 
<span class="lineNum">     685 </span>            : 
<span class="lineNum">     686 </span>            : /*
<span class="lineNum">     687 </span>            : ** create a new Lua closure, push it in the stack, and initialize
<span class="lineNum">     688 </span>            : ** its upvalues.
<span class="lineNum">     689 </span>            : */
<span class="lineNum">     690 </span><span class="lineCov">       2404 : static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base,</span>
<span class="lineNum">     691 </span>            :                          StkId ra) {
<span class="lineNum">     692 </span><span class="lineCov">       2404 :   int nup = p-&gt;sizeupvalues;</span>
<span class="lineNum">     693 </span><span class="lineCov">       2404 :   Upvaldesc *uv = p-&gt;upvalues;</span>
<span class="lineNum">     694 </span>            :   int i;
<span class="lineNum">     695 </span><span class="lineCov">       2404 :   LClosure *ncl = luaF_newLclosure(L, nup);</span>
<span class="lineNum">     696 </span><span class="lineCov">       2404 :   ncl-&gt;p = p;</span>
<span class="lineNum">     697 </span><span class="lineCov">       2404 :   setclLvalue2s(L, ra, ncl);  /* anchor new closure in stack */</span>
<span class="lineNum">     698 </span><span class="lineCov">      10344 :   for (i = 0; i &lt; nup; i++) {  /* fill in its upvalues */</span>
<span class="lineNum">     699 </span><span class="lineCov">       7940 :     if (uv[i].instack)  /* upvalue refers to local variable? */</span>
<span class="lineNum">     700 </span><span class="lineCov">       6346 :       ncl-&gt;upvals[i] = luaF_findupval(L, base + uv[i].idx);</span>
<span class="lineNum">     701 </span>            :     else  /* get upvalue from enclosing function */
<span class="lineNum">     702 </span><span class="lineCov">       1594 :       ncl-&gt;upvals[i] = encup[uv[i].idx];</span>
<span class="lineNum">     703 </span><span class="lineCov">       7940 :     luaC_objbarrier(L, ncl, ncl-&gt;upvals[i]);</span>
<span class="lineNum">     704 </span>            :   }
<span class="lineNum">     705 </span><span class="lineCov">       2404 : }</span>
<span class="lineNum">     706 </span>            : 
<span class="lineNum">     707 </span>            : 
<span class="lineNum">     708 </span>            : /*
<span class="lineNum">     709 </span>            : ** finish execution of an opcode interrupted by a yield
<span class="lineNum">     710 </span>            : */
<span class="lineNum">     711 </span><span class="lineCov">      16133 : void luaV_finishOp (lua_State *L) {</span>
<span class="lineNum">     712 </span><span class="lineCov">      16133 :   CallInfo *ci = L-&gt;ci;</span>
<span class="lineNum">     713 </span><span class="lineCov">      16133 :   StkId base = ci-&gt;func + 1;</span>
<span class="lineNum">     714 </span><span class="lineCov">      16133 :   Instruction inst = *(ci-&gt;u.l.savedpc - 1);  /* interrupted instruction */</span>
<span class="lineNum">     715 </span><span class="lineCov">      16133 :   OpCode op = GET_OPCODE(inst);</span>
<span class="lineNum">     716 </span><span class="lineCov">      16133 :   switch (op) {  /* finish its execution */</span>
<span class="lineNum">     717 </span><span class="lineNoCov">          0 :     case OP_ADDI: case OP_SUBI:</span>
<span class="lineNum">     718 </span>            :     case OP_MULI: case OP_DIVI: case OP_IDIVI:
<span class="lineNum">     719 </span>            :     case OP_MODI: case OP_POWI:
<span class="lineNum">     720 </span>            :     case OP_ADD: case OP_SUB:
<span class="lineNum">     721 </span>            :     case OP_MUL: case OP_DIV: case OP_IDIV:
<span class="lineNum">     722 </span>            :     case OP_BANDK: case OP_BORK: case OP_BXORK:
<span class="lineNum">     723 </span>            :     case OP_BAND: case OP_BOR: case OP_BXOR:
<span class="lineNum">     724 </span>            :     case OP_SHRI: case OP_SHL: case OP_SHR:
<span class="lineNum">     725 </span>            :     case OP_MOD: case OP_POW:
<span class="lineNum">     726 </span>            :     case OP_UNM: case OP_BNOT: case OP_LEN:
<span class="lineNum">     727 </span>            :     case OP_GETTABUP: case OP_GETTABLE: case OP_GETI:
<span class="lineNum">     728 </span>            :     case OP_GETFIELD: case OP_SELF: {
<span class="lineNum">     729 </span><span class="lineNoCov">          0 :       setobjs2s(L, base + GETARG_A(inst), --L-&gt;top);</span>
<span class="lineNum">     730 </span><span class="lineNoCov">          0 :       break;</span>
<span class="lineNum">     731 </span>            :     }
<span class="lineNum">     732 </span><span class="lineCov">          2 :     case OP_LT: case OP_LE:</span>
<span class="lineNum">     733 </span>            :     case OP_LTI: case OP_LEI:
<span class="lineNum">     734 </span>            :     case OP_GTI: case OP_GEI:
<span class="lineNum">     735 </span>            :     case OP_EQ: {  /* note that 'OP_EQI'/'OP_EQK' cannot yield */
<span class="lineNum">     736 </span><span class="lineCov">          2 :       int res = !l_isfalse(s2v(L-&gt;top - 1));</span>
<span class="lineNum">     737 </span><span class="lineCov">          2 :       L-&gt;top--;</span>
<span class="lineNum">     738 </span>            : #if defined(LUA_COMPAT_LT_LE)
<span class="lineNum">     739 </span><span class="lineCov">          2 :       if (ci-&gt;callstatus &amp; CIST_LEQ) {  /* &quot;&lt;=&quot; using &quot;&lt;&quot; instead? */</span>
<span class="lineNum">     740 </span><span class="lineNoCov">          0 :         ci-&gt;callstatus ^= CIST_LEQ;  /* clear mark */</span>
<span class="lineNum">     741 </span><span class="lineNoCov">          0 :         res = !res;  /* negate result */</span>
<span class="lineNum">     742 </span>            :       }
<span class="lineNum">     743 </span>            : #endif
<span class="lineNum">     744 </span>            :       lua_assert(GET_OPCODE(*ci-&gt;u.l.savedpc) == OP_JMP);
<span class="lineNum">     745 </span><span class="lineCov">          2 :       if (res != GETARG_k(inst))  /* condition failed? */</span>
<span class="lineNum">     746 </span><span class="lineCov">          1 :         ci-&gt;u.l.savedpc++;  /* skip jump instruction */</span>
<span class="lineNum">     747 </span><span class="lineCov">          2 :       break;</span>
<span class="lineNum">     748 </span>            :     }
<span class="lineNum">     749 </span><span class="lineNoCov">          0 :     case OP_CONCAT: {</span>
<span class="lineNum">     750 </span><span class="lineNoCov">          0 :       StkId top = L-&gt;top - 1;  /* top when 'luaT_trybinTM' was called */</span>
<span class="lineNum">     751 </span><span class="lineNoCov">          0 :       int a = GETARG_A(inst);      /* first element to concatenate */</span>
<span class="lineNum">     752 </span><span class="lineNoCov">          0 :       int total = cast_int(top - 1 - (base + a));  /* yet to concatenate */</span>
<span class="lineNum">     753 </span><span class="lineNoCov">          0 :       setobjs2s(L, top - 2, top);  /* put TM result in proper position */</span>
<span class="lineNum">     754 </span><span class="lineNoCov">          0 :       if (total &gt; 1) {  /* are there elements to concat? */</span>
<span class="lineNum">     755 </span><span class="lineNoCov">          0 :         L-&gt;top = top - 1;  /* top is one after last element (at top-2) */</span>
<span class="lineNum">     756 </span><span class="lineNoCov">          0 :         luaV_concat(L, total);  /* concat them (may yield again) */</span>
<span class="lineNum">     757 </span>            :       }
<span class="lineNum">     758 </span><span class="lineNoCov">          0 :       break;</span>
<span class="lineNum">     759 </span>            :     }
<span class="lineNum">     760 </span><span class="lineCov">      16131 :     default: {</span>
<span class="lineNum">     761 </span>            :       /* only these other opcodes can yield */
<span class="lineNum">     762 </span>            :       lua_assert(op == OP_TFORCALL || op == OP_CALL ||
<span class="lineNum">     763 </span>            :            op == OP_TAILCALL || op == OP_SETTABUP || op == OP_SETTABLE ||
<span class="lineNum">     764 </span>            :            op == OP_SETI || op == OP_SETFIELD);
<span class="lineNum">     765 </span><span class="lineCov">      16131 :       break;</span>
<span class="lineNum">     766 </span>            :     }
<span class="lineNum">     767 </span>            :   }
<span class="lineNum">     768 </span><span class="lineCov">      16133 : }</span>
<span class="lineNum">     769 </span>            : 
<span class="lineNum">     770 </span>            : 
<span class="lineNum">     771 </span>            : 
<span class="lineNum">     772 </span>            : 
<span class="lineNum">     773 </span>            : /*
<span class="lineNum">     774 </span>            : ** {==================================================================
<span class="lineNum">     775 </span>            : ** Macros for arithmetic/bitwise/comparison opcodes in 'luaV_execute'
<span class="lineNum">     776 </span>            : ** ===================================================================
<span class="lineNum">     777 </span>            : */
<span class="lineNum">     778 </span>            : 
<span class="lineNum">     779 </span>            : #define l_addi(L,a,b)   intop(+, a, b)
<span class="lineNum">     780 </span>            : #define l_subi(L,a,b)   intop(-, a, b)
<span class="lineNum">     781 </span>            : #define l_muli(L,a,b)   intop(*, a, b)
<span class="lineNum">     782 </span>            : #define l_band(L,a,b)   intop(&amp;, a, b)
<span class="lineNum">     783 </span>            : #define l_bor(L,a,b)    intop(|, a, b)
<span class="lineNum">     784 </span>            : #define l_bxor(L,a,b)   intop(^, a, b)
<span class="lineNum">     785 </span>            : 
<span class="lineNum">     786 </span>            : #define l_lti(a,b)      (a &lt; b)
<span class="lineNum">     787 </span>            : #define l_lei(a,b)      (a &lt;= b)
<span class="lineNum">     788 </span>            : #define l_gti(a,b)      (a &gt; b)
<span class="lineNum">     789 </span>            : #define l_gei(a,b)      (a &gt;= b)
<span class="lineNum">     790 </span>            : 
<span class="lineNum">     791 </span>            : 
<span class="lineNum">     792 </span>            : /*
<span class="lineNum">     793 </span>            : ** Auxiliary macro for arithmetic operations over floats and others
<span class="lineNum">     794 </span>            : ** with immediate operand. 'fop' is the float operation; 'tm' is the
<span class="lineNum">     795 </span>            : ** corresponding metamethod; 'flip' is true if operands were flipped.
<span class="lineNum">     796 </span>            : */
<span class="lineNum">     797 </span>            : #define op_arithfI_aux(L,v1,imm,fop,tm,flip) {  \
<span class="lineNum">     798 </span>            :   lua_Number nb;  \
<span class="lineNum">     799 </span>            :   if (tonumberns(v1, nb)) {  \
<span class="lineNum">     800 </span>            :     setfltvalue(s2v(ra), fop(L, nb, cast_num(imm)));  \
<span class="lineNum">     801 </span>            :   }  \
<span class="lineNum">     802 </span>            :   else  \
<span class="lineNum">     803 </span>            :     Protect(luaT_trybiniTM(L, v1, imm, flip, ra, tm)); }
<span class="lineNum">     804 </span>            : 
<span class="lineNum">     805 </span>            : 
<span class="lineNum">     806 </span>            : /*
<span class="lineNum">     807 </span>            : ** Arithmetic operations over floats and others with immediate operand.
<span class="lineNum">     808 </span>            : */
<span class="lineNum">     809 </span>            : #define op_arithfI(L,fop,tm) {  \
<span class="lineNum">     810 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     811 </span>            :   int imm = GETARG_sC(i);  \
<span class="lineNum">     812 </span>            :   op_arithfI_aux(L, v1, imm, fop, tm, 0); }
<span class="lineNum">     813 </span>            : 
<span class="lineNum">     814 </span>            : /*
<span class="lineNum">     815 </span>            : ** Arithmetic operations with immediate operands. 'iop' is the integer
<span class="lineNum">     816 </span>            : ** operation.
<span class="lineNum">     817 </span>            : */
<span class="lineNum">     818 </span>            : #define op_arithI(L,iop,fop,tm,flip) {  \
<span class="lineNum">     819 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     820 </span>            :   int imm = GETARG_sC(i);  \
<span class="lineNum">     821 </span>            :   if (ttisinteger(v1)) {  \
<span class="lineNum">     822 </span>            :     setivalue(s2v(ra), iop(L, ivalue(v1), imm));  \
<span class="lineNum">     823 </span>            :   }  \
<span class="lineNum">     824 </span>            :   else op_arithfI_aux(L, v1, imm, fop, tm, flip); }
<span class="lineNum">     825 </span>            : 
<span class="lineNum">     826 </span>            : 
<span class="lineNum">     827 </span>            : /*
<span class="lineNum">     828 </span>            : ** Auxiliary function for arithmetic operations over floats and others
<span class="lineNum">     829 </span>            : ** with two register operands.
<span class="lineNum">     830 </span>            : */
<span class="lineNum">     831 </span>            : #define op_arithf_aux(L,v1,v2,fop,tm) {  \
<span class="lineNum">     832 </span>            :   lua_Number n1; lua_Number n2;  \
<span class="lineNum">     833 </span>            :   if (tonumberns(v1, n1) &amp;&amp; tonumberns(v2, n2)) {  \
<span class="lineNum">     834 </span>            :     setfltvalue(s2v(ra), fop(L, n1, n2));  \
<span class="lineNum">     835 </span>            :   }  \
<span class="lineNum">     836 </span>            :   else  \
<span class="lineNum">     837 </span>            :     Protect(luaT_trybinTM(L, v1, v2, ra, tm)); }
<span class="lineNum">     838 </span>            : 
<span class="lineNum">     839 </span>            : 
<span class="lineNum">     840 </span>            : /*
<span class="lineNum">     841 </span>            : ** Arithmetic operations over floats and others with register operands.
<span class="lineNum">     842 </span>            : */
<span class="lineNum">     843 </span>            : #define op_arithf(L,fop,tm) {  \
<span class="lineNum">     844 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     845 </span>            :   TValue *v2 = vRC(i);  \
<span class="lineNum">     846 </span>            :   op_arithf_aux(L, v1, v2, fop, tm); }
<span class="lineNum">     847 </span>            : 
<span class="lineNum">     848 </span>            : 
<span class="lineNum">     849 </span>            : /*
<span class="lineNum">     850 </span>            : ** Arithmetic operations with register operands.
<span class="lineNum">     851 </span>            : */
<span class="lineNum">     852 </span>            : #define op_arith(L,iop,fop,tm) {  \
<span class="lineNum">     853 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     854 </span>            :   TValue *v2 = vRC(i);  \
<span class="lineNum">     855 </span>            :   if (ttisinteger(v1) &amp;&amp; ttisinteger(v2)) {  \
<span class="lineNum">     856 </span>            :     lua_Integer i1 = ivalue(v1); lua_Integer i2 = ivalue(v2);  \
<span class="lineNum">     857 </span>            :     setivalue(s2v(ra), iop(L, i1, i2));  \
<span class="lineNum">     858 </span>            :   }  \
<span class="lineNum">     859 </span>            :   else op_arithf_aux(L, v1, v2, fop, tm); }
<span class="lineNum">     860 </span>            : 
<span class="lineNum">     861 </span>            : 
<span class="lineNum">     862 </span>            : /*
<span class="lineNum">     863 </span>            : ** Arithmetic operations with K operands.
<span class="lineNum">     864 </span>            : */
<span class="lineNum">     865 </span>            : #define op_arithK(L,iop,fop,tm,flip) {  \
<span class="lineNum">     866 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     867 </span>            :   TValue *v2 = KC(i);  \
<span class="lineNum">     868 </span>            :   if (ttisinteger(v1) &amp;&amp; ttisinteger(v2)) {  \
<span class="lineNum">     869 </span>            :     lua_Integer i1 = ivalue(v1); lua_Integer i2 = ivalue(v2);  \
<span class="lineNum">     870 </span>            :     setivalue(s2v(ra), iop(L, i1, i2));  \
<span class="lineNum">     871 </span>            :   }  \
<span class="lineNum">     872 </span>            :   else { \
<span class="lineNum">     873 </span>            :     lua_Number n1; lua_Number n2;  \
<span class="lineNum">     874 </span>            :     if (tonumberns(v1, n1) &amp;&amp; tonumberns(v2, n2)) {  \
<span class="lineNum">     875 </span>            :       setfltvalue(s2v(ra), fop(L, n1, n2));  \
<span class="lineNum">     876 </span>            :     }  \
<span class="lineNum">     877 </span>            :     else  \
<span class="lineNum">     878 </span>            :       Protect(luaT_trybinassocTM(L, v1, v2, ra, flip, tm)); } }
<span class="lineNum">     879 </span>            : 
<span class="lineNum">     880 </span>            : 
<span class="lineNum">     881 </span>            : /*
<span class="lineNum">     882 </span>            : ** Arithmetic operations with K operands for floats.
<span class="lineNum">     883 </span>            : */
<span class="lineNum">     884 </span>            : #define op_arithfK(L,fop,tm) {  \
<span class="lineNum">     885 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     886 </span>            :   TValue *v2 = KC(i);  \
<span class="lineNum">     887 </span>            :   lua_Number n1; lua_Number n2;  \
<span class="lineNum">     888 </span>            :   if (tonumberns(v1, n1) &amp;&amp; tonumberns(v2, n2)) {  \
<span class="lineNum">     889 </span>            :     setfltvalue(s2v(ra), fop(L, n1, n2));  \
<span class="lineNum">     890 </span>            :   }  \
<span class="lineNum">     891 </span>            :   else  \
<span class="lineNum">     892 </span>            :     Protect(luaT_trybinTM(L, v1, v2, ra, tm)); }
<span class="lineNum">     893 </span>            : 
<span class="lineNum">     894 </span>            : 
<span class="lineNum">     895 </span>            : /*
<span class="lineNum">     896 </span>            : ** Bitwise operations with constant operand.
<span class="lineNum">     897 </span>            : */
<span class="lineNum">     898 </span>            : #define op_bitwiseK(L,op,tm) {  \
<span class="lineNum">     899 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     900 </span>            :   TValue *v2 = KC(i);  \
<span class="lineNum">     901 </span>            :   lua_Integer i1;  \
<span class="lineNum">     902 </span>            :   lua_Integer i2 = ivalue(v2);  \
<span class="lineNum">     903 </span>            :   if (tointegerns(v1, &amp;i1)) {  \
<span class="lineNum">     904 </span>            :     setivalue(s2v(ra), op(L, i1, i2));  \
<span class="lineNum">     905 </span>            :   }  \
<span class="lineNum">     906 </span>            :   else  \
<span class="lineNum">     907 </span>            :     Protect(luaT_trybiniTM(L, v1, i2, TESTARG_k(i), ra, tm)); }
<span class="lineNum">     908 </span>            : 
<span class="lineNum">     909 </span>            : 
<span class="lineNum">     910 </span>            : /*
<span class="lineNum">     911 </span>            : ** Bitwise operations with register operands.
<span class="lineNum">     912 </span>            : */
<span class="lineNum">     913 </span>            : #define op_bitwise(L,op,tm) {  \
<span class="lineNum">     914 </span>            :   TValue *v1 = vRB(i);  \
<span class="lineNum">     915 </span>            :   TValue *v2 = vRC(i);  \
<span class="lineNum">     916 </span>            :   lua_Integer i1; lua_Integer i2;  \
<span class="lineNum">     917 </span>            :   if (tointegerns(v1, &amp;i1) &amp;&amp; tointegerns(v2, &amp;i2)) {  \
<span class="lineNum">     918 </span>            :     setivalue(s2v(ra), op(L, i1, i2));  \
<span class="lineNum">     919 </span>            :   }  \
<span class="lineNum">     920 </span>            :   else  \
<span class="lineNum">     921 </span>            :     Protect(luaT_trybinTM(L, v1, v2, ra, tm)); }
<span class="lineNum">     922 </span>            : 
<span class="lineNum">     923 </span>            : 
<span class="lineNum">     924 </span>            : /*
<span class="lineNum">     925 </span>            : ** Order operations with register operands.
<span class="lineNum">     926 </span>            : */
<span class="lineNum">     927 </span>            : #define op_order(L,opi,opf,other) {  \
<span class="lineNum">     928 </span>            :         int cond;  \
<span class="lineNum">     929 </span>            :         TValue *rb = vRB(i);  \
<span class="lineNum">     930 </span>            :         if (ttisinteger(s2v(ra)) &amp;&amp; ttisinteger(rb))  \
<span class="lineNum">     931 </span>            :           cond = opi(ivalue(s2v(ra)), ivalue(rb));  \
<span class="lineNum">     932 </span>            :         else if (ttisnumber(s2v(ra)) &amp;&amp; ttisnumber(rb))  \
<span class="lineNum">     933 </span>            :           cond = opf(s2v(ra), rb);  \
<span class="lineNum">     934 </span>            :         else  \
<span class="lineNum">     935 </span>            :           Protect(cond = other(L, s2v(ra), rb));  \
<span class="lineNum">     936 </span>            :         docondjump(); }
<span class="lineNum">     937 </span>            : 
<span class="lineNum">     938 </span>            : 
<span class="lineNum">     939 </span>            : /*
<span class="lineNum">     940 </span>            : ** Order operations with immediate operand.
<span class="lineNum">     941 </span>            : */
<span class="lineNum">     942 </span>            : #define op_orderI(L,opi,opf,inv,tm) {  \
<span class="lineNum">     943 </span>            :         int cond;  \
<span class="lineNum">     944 </span>            :         int im = GETARG_sB(i);  \
<span class="lineNum">     945 </span>            :         if (ttisinteger(s2v(ra)))  \
<span class="lineNum">     946 </span>            :           cond = opi(ivalue(s2v(ra)), im);  \
<span class="lineNum">     947 </span>            :         else if (ttisfloat(s2v(ra)))  \
<span class="lineNum">     948 </span>            :           cond = opf(fltvalue(s2v(ra)), cast_num(im));  \
<span class="lineNum">     949 </span>            :         else {  \
<span class="lineNum">     950 </span>            :           int isf = GETARG_C(i);  \
<span class="lineNum">     951 </span>            :           Protect(cond = luaT_callorderiTM(L, s2v(ra), im, inv, isf, tm));  \
<span class="lineNum">     952 </span>            :         }  \
<span class="lineNum">     953 </span>            :         docondjump(); }
<span class="lineNum">     954 </span>            : 
<span class="lineNum">     955 </span>            : /* }================================================================== */
<span class="lineNum">     956 </span>            : 
<span class="lineNum">     957 </span>            : 
<span class="lineNum">     958 </span>            : /*
<span class="lineNum">     959 </span>            : ** {==================================================================
<span class="lineNum">     960 </span>            : ** Function 'luaV_execute': main interpreter loop
<span class="lineNum">     961 </span>            : ** ===================================================================
<span class="lineNum">     962 </span>            : */
<span class="lineNum">     963 </span>            : 
<span class="lineNum">     964 </span>            : /*
<span class="lineNum">     965 </span>            : ** some macros for common tasks in 'luaV_execute'
<span class="lineNum">     966 </span>            : */
<span class="lineNum">     967 </span>            : 
<span class="lineNum">     968 </span>            : 
<span class="lineNum">     969 </span>            : #define RA(i)   (base+GETARG_A(i))
<span class="lineNum">     970 </span>            : #define RB(i)   (base+GETARG_B(i))
<span class="lineNum">     971 </span>            : #define vRB(i)  s2v(RB(i))
<span class="lineNum">     972 </span>            : #define KB(i)   (k+GETARG_B(i))
<span class="lineNum">     973 </span>            : #define RC(i)   (base+GETARG_C(i))
<span class="lineNum">     974 </span>            : #define vRC(i)  s2v(RC(i))
<span class="lineNum">     975 </span>            : #define KC(i)   (k+GETARG_C(i))
<span class="lineNum">     976 </span>            : #define RKC(i)  ((TESTARG_k(i)) ? k + GETARG_C(i) : s2v(base + GETARG_C(i)))
<span class="lineNum">     977 </span>            : 
<span class="lineNum">     978 </span>            : 
<span class="lineNum">     979 </span>            : 
<span class="lineNum">     980 </span>            : #define updatetrap(ci)  (trap = ci-&gt;u.l.trap)
<span class="lineNum">     981 </span>            : 
<span class="lineNum">     982 </span>            : #define updatebase(ci)  (base = ci-&gt;func + 1)
<span class="lineNum">     983 </span>            : 
<span class="lineNum">     984 </span>            : 
<span class="lineNum">     985 </span>            : #define updatestack(ci) { if (trap) { updatebase(ci); ra = RA(i); } }
<span class="lineNum">     986 </span>            : 
<span class="lineNum">     987 </span>            : 
<span class="lineNum">     988 </span>            : /*
<span class="lineNum">     989 </span>            : ** Execute a jump instruction. The 'updatetrap' allows signals to stop
<span class="lineNum">     990 </span>            : ** tight loops. (Without it, the local copy of 'trap' could never change.)
<span class="lineNum">     991 </span>            : */
<span class="lineNum">     992 </span>            : #define dojump(ci,i,e)  { pc += GETARG_sJ(i) + e; updatetrap(ci); }
<span class="lineNum">     993 </span>            : 
<span class="lineNum">     994 </span>            : 
<span class="lineNum">     995 </span>            : /* for test instructions, execute the jump instruction that follows it */
<span class="lineNum">     996 </span>            : #define donextjump(ci)  { i = *pc; dojump(ci, i, 1); }
<span class="lineNum">     997 </span>            : 
<span class="lineNum">     998 </span>            : /*
<span class="lineNum">     999 </span>            : ** do a conditional jump: skip next instruction if 'cond' is not what
<span class="lineNum">    1000 </span>            : ** was expected (parameter 'k'), else do next instruction, which must
<span class="lineNum">    1001 </span>            : ** be a jump.
<span class="lineNum">    1002 </span>            : */
<span class="lineNum">    1003 </span>            : #define docondjump()    if (cond != GETARG_k(i)) pc++; else donextjump(ci);
<span class="lineNum">    1004 </span>            : 
<span class="lineNum">    1005 </span>            : 
<span class="lineNum">    1006 </span>            : /*
<span class="lineNum">    1007 </span>            : ** Correct global 'pc'.
<span class="lineNum">    1008 </span>            : */
<span class="lineNum">    1009 </span>            : #define savepc(L)       (ci-&gt;u.l.savedpc = pc)
<span class="lineNum">    1010 </span>            : 
<span class="lineNum">    1011 </span>            : 
<span class="lineNum">    1012 </span>            : /*
<span class="lineNum">    1013 </span>            : ** Whenever code can raise errors, the global 'pc' and the global
<span class="lineNum">    1014 </span>            : ** 'top' must be correct to report occasional errors.
<span class="lineNum">    1015 </span>            : */
<span class="lineNum">    1016 </span>            : #define savestate(L,ci)         (savepc(L), L-&gt;top = ci-&gt;top)
<span class="lineNum">    1017 </span>            : 
<span class="lineNum">    1018 </span>            : 
<span class="lineNum">    1019 </span>            : /*
<span class="lineNum">    1020 </span>            : ** Protect code that, in general, can raise errors, reallocate the
<span class="lineNum">    1021 </span>            : ** stack, and change the hooks.
<span class="lineNum">    1022 </span>            : */
<span class="lineNum">    1023 </span>            : #define Protect(exp)  (savestate(L,ci), (exp), updatetrap(ci))
<span class="lineNum">    1024 </span>            : 
<span class="lineNum">    1025 </span>            : /* special version that does not change the top */
<span class="lineNum">    1026 </span>            : #define ProtectNT(exp)  (savepc(L), (exp), updatetrap(ci))
<span class="lineNum">    1027 </span>            : 
<span class="lineNum">    1028 </span>            : /*
<span class="lineNum">    1029 </span>            : ** Protect code that will finish the loop (returns) or can only raise
<span class="lineNum">    1030 </span>            : ** errors. (That is, it will not return to the interpreter main loop
<span class="lineNum">    1031 </span>            : ** after changing the stack or hooks.)
<span class="lineNum">    1032 </span>            : */
<span class="lineNum">    1033 </span>            : #define halfProtect(exp)  (savepc(L), (exp))
<span class="lineNum">    1034 </span>            : 
<span class="lineNum">    1035 </span>            : 
<span class="lineNum">    1036 </span>            : #define checkGC(L,c)  \
<span class="lineNum">    1037 </span>            :         { luaC_condGC(L, L-&gt;top = (c),  /* limit of live values */ \
<span class="lineNum">    1038 </span>            :                          updatetrap(ci)); \
<span class="lineNum">    1039 </span>            :            luai_threadyield(L); }
<span class="lineNum">    1040 </span>            : 
<span class="lineNum">    1041 </span>            : 
<span class="lineNum">    1042 </span>            : /* fetch an instruction and prepare its execution */
<span class="lineNum">    1043 </span>            : #define vmfetch()       { \
<span class="lineNum">    1044 </span>            :   if (trap) {  /* stack reallocation or hooks? */ \
<span class="lineNum">    1045 </span>            :     trap = luaG_traceexec(L, pc);  /* handle hooks */ \
<span class="lineNum">    1046 </span>            :     updatebase(ci);  /* correct stack */ \
<span class="lineNum">    1047 </span>            :   } \
<span class="lineNum">    1048 </span>            :   i = *(pc++); \
<span class="lineNum">    1049 </span>            :   ra = RA(i); /* WARNING: any stack reallocation invalidates 'ra' */ \
<span class="lineNum">    1050 </span>            : }
<span class="lineNum">    1051 </span>            : 
<span class="lineNum">    1052 </span>            : #define vmdispatch(o)   switch(o)
<span class="lineNum">    1053 </span>            : #define vmcase(l)       case l:
<span class="lineNum">    1054 </span>            : #define vmbreak         break
<span class="lineNum">    1055 </span>            : 
<span class="lineNum">    1056 </span>            : 
<span class="lineNum">    1057 </span><span class="lineCov">      40133 : void luaV_execute (lua_State *L, CallInfo *ci) {</span>
<span class="lineNum">    1058 </span>            :   LClosure *cl;
<span class="lineNum">    1059 </span>            :   TValue *k;
<span class="lineNum">    1060 </span>            :   StkId base;
<span class="lineNum">    1061 </span>            :   const Instruction *pc;
<span class="lineNum">    1062 </span>            :   int trap;
<span class="lineNum">    1063 </span>            : #if LUA_USE_JUMPTABLE
<span class="lineNum">    1064 </span>            : #include &quot;ljumptab.h&quot;
<span class="lineNum">    1065 </span>            : #endif
<span class="lineNum">    1066 </span><span class="lineCov">      40133 :  tailcall:</span>
<span class="lineNum">    1067 </span><span class="lineCov">      40133 :   trap = L-&gt;hookmask;</span>
<span class="lineNum">    1068 </span><span class="lineCov">      40133 :   cl = clLvalue(s2v(ci-&gt;func));</span>
<span class="lineNum">    1069 </span><span class="lineCov">      40133 :   k = cl-&gt;p-&gt;k;</span>
<span class="lineNum">    1070 </span><span class="lineCov">      40133 :   pc = ci-&gt;u.l.savedpc;</span>
<span class="lineNum">    1071 </span><span class="lineCov">      40133 :   if (trap) {</span>
<span class="lineNum">    1072 </span><span class="lineCov">        272 :     if (cl-&gt;p-&gt;is_vararg)</span>
<span class="lineNum">    1073 </span><span class="lineNoCov">          0 :       trap = 0;  /* hooks will start after VARARGPREP instruction */</span>
<span class="lineNum">    1074 </span><span class="lineCov">        272 :     else if (pc == cl-&gt;p-&gt;code)  /* first instruction (not resuming)? */</span>
<span class="lineNum">    1075 </span><span class="lineCov">        272 :       luaD_hookcall(L, ci);</span>
<span class="lineNum">    1076 </span><span class="lineCov">        272 :     ci-&gt;u.l.trap = 1;  /* there may be other hooks */</span>
<span class="lineNum">    1077 </span>            :   }
<span class="lineNum">    1078 </span><span class="lineCov">      40133 :   base = ci-&gt;func + 1;</span>
<span class="lineNum">    1079 </span>            :   /* main loop of interpreter */
<span class="lineNum">    1080 </span>            :   for (;;) {
<span class="lineNum">    1081 </span>            :     Instruction i;  /* instruction being executed */
<span class="lineNum">    1082 </span>            :     StkId ra;  /* instruction's A register */
<span class="lineNum">    1083 </span><span class="lineCov">      40133 :     vmfetch();</span>
<span class="lineNum">    1084 </span>            :     lua_assert(base == ci-&gt;func + 1);
<span class="lineNum">    1085 </span>            :     lua_assert(base &lt;= L-&gt;top &amp;&amp; L-&gt;top &lt; L-&gt;stack + L-&gt;stacksize);
<span class="lineNum">    1086 </span>            :     lua_assert(ci-&gt;top &lt; L-&gt;stack + L-&gt;stacksize);
<span class="lineNum">    1087 </span><span class="lineCov">      40133 :     vmdispatch (GET_OPCODE(i)) {</span>
<span class="lineNum">    1088 </span><span class="lineCov">      98340 :       vmcase(OP_MOVE) {</span>
<span class="lineNum">    1089 </span><span class="lineCov">      98340 :         setobjs2s(L, ra, RB(i));</span>
<span class="lineNum">    1090 </span><span class="lineCov">      98340 :         vmbreak;</span>
<span class="lineNum">    1091 </span>            :       }
<span class="lineNum">    1092 </span><span class="lineCov">      22620 :       vmcase(OP_LOADK) {</span>
<span class="lineNum">    1093 </span><span class="lineCov">      22620 :         TValue *rb = k + GETARG_Bx(i);</span>
<span class="lineNum">    1094 </span><span class="lineCov">      22620 :         setobj2s(L, ra, rb);</span>
<span class="lineNum">    1095 </span><span class="lineCov">      22620 :         vmbreak;</span>
<span class="lineNum">    1096 </span>            :       }
<span class="lineNum">    1097 </span><span class="lineCov">      11436 :       vmcase(OP_LOADI) {</span>
<span class="lineNum">    1098 </span><span class="lineCov">      11436 :         lua_Integer b = GETARG_sBx(i);</span>
<span class="lineNum">    1099 </span><span class="lineCov">      11436 :         setivalue(s2v(ra), b);</span>
<span class="lineNum">    1100 </span><span class="lineCov">      11436 :         vmbreak;</span>
<span class="lineNum">    1101 </span>            :       }
<span class="lineNum">    1102 </span><span class="lineCov">         49 :       vmcase(OP_LOADF) {</span>
<span class="lineNum">    1103 </span><span class="lineCov">         49 :         int b = GETARG_sBx(i);</span>
<span class="lineNum">    1104 </span><span class="lineCov">         49 :         setfltvalue(s2v(ra), cast_num(b));</span>
<span class="lineNum">    1105 </span><span class="lineCov">         49 :         vmbreak;</span>
<span class="lineNum">    1106 </span>            :       }
<span class="lineNum">    1107 </span><span class="lineNoCov">          0 :       vmcase(OP_LOADKX) {</span>
<span class="lineNum">    1108 </span>            :         TValue *rb;
<span class="lineNum">    1109 </span><span class="lineNoCov">          0 :         rb = k + GETARG_Ax(*pc); pc++;</span>
<span class="lineNum">    1110 </span><span class="lineNoCov">          0 :         setobj2s(L, ra, rb);</span>
<span class="lineNum">    1111 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1112 </span>            :       }
<span class="lineNum">    1113 </span><span class="lineCov">       7744 :       vmcase(OP_LOADBOOL) {</span>
<span class="lineNum">    1114 </span><span class="lineCov">       7744 :         setbvalue(s2v(ra), GETARG_B(i));</span>
<span class="lineNum">    1115 </span><span class="lineCov">       7744 :         if (GETARG_C(i)) pc++;  /* skip next instruction (if C) */</span>
<span class="lineNum">    1116 </span><span class="lineCov">       7744 :         vmbreak;</span>
<span class="lineNum">    1117 </span>            :       }
<span class="lineNum">    1118 </span><span class="lineCov">        596 :       vmcase(OP_LOADNIL) {</span>
<span class="lineNum">    1119 </span><span class="lineCov">        596 :         int b = GETARG_B(i);</span>
<span class="lineNum">    1120 </span>            :         do {
<span class="lineNum">    1121 </span><span class="lineCov">        769 :           setnilvalue(s2v(ra++));</span>
<span class="lineNum">    1122 </span><span class="lineCov">        769 :         } while (b--);</span>
<span class="lineNum">    1123 </span><span class="lineCov">        596 :         vmbreak;</span>
<span class="lineNum">    1124 </span>            :       }
<span class="lineNum">    1125 </span><span class="lineCov">      33390 :       vmcase(OP_GETUPVAL) {</span>
<span class="lineNum">    1126 </span><span class="lineCov">      33390 :         int b = GETARG_B(i);</span>
<span class="lineNum">    1127 </span><span class="lineCov">      33390 :         setobj2s(L, ra, cl-&gt;upvals[b]-&gt;v);</span>
<span class="lineNum">    1128 </span><span class="lineCov">      33390 :         vmbreak;</span>
<span class="lineNum">    1129 </span>            :       }
<span class="lineNum">    1130 </span><span class="lineCov">       2903 :       vmcase(OP_SETUPVAL) {</span>
<span class="lineNum">    1131 </span><span class="lineCov">       2903 :         UpVal *uv = cl-&gt;upvals[GETARG_B(i)];</span>
<span class="lineNum">    1132 </span><span class="lineCov">       2903 :         setobj(L, uv-&gt;v, s2v(ra));</span>
<span class="lineNum">    1133 </span><span class="lineCov">       2903 :         luaC_barrier(L, uv, s2v(ra));</span>
<span class="lineNum">    1134 </span><span class="lineCov">       2903 :         vmbreak;</span>
<span class="lineNum">    1135 </span>            :       }
<span class="lineNum">    1136 </span><span class="lineCov">      48926 :       vmcase(OP_GETTABUP) {</span>
<span class="lineNum">    1137 </span>            :         const TValue *slot;
<span class="lineNum">    1138 </span><span class="lineCov">      48926 :         TValue *upval = cl-&gt;upvals[GETARG_B(i)]-&gt;v;</span>
<span class="lineNum">    1139 </span><span class="lineCov">      48926 :         TValue *rc = KC(i);</span>
<span class="lineNum">    1140 </span><span class="lineCov">      48926 :         TString *key = tsvalue(rc);  /* key must be a string */</span>
<span class="lineNum">    1141 </span><span class="lineCov">      48926 :         if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) {</span>
<span class="lineNum">    1142 </span><span class="lineCov">      48878 :           setobj2s(L, ra, slot);</span>
<span class="lineNum">    1143 </span>            :         }
<span class="lineNum">    1144 </span>            :         else
<span class="lineNum">    1145 </span><span class="lineCov">         48 :           Protect(luaV_finishget(L, upval, rc, ra, slot));</span>
<span class="lineNum">    1146 </span><span class="lineCov">      48926 :         vmbreak;</span>
<span class="lineNum">    1147 </span>            :       }
<span class="lineNum">    1148 </span><span class="lineCov">      41825 :       vmcase(OP_GETTABLE) {</span>
<span class="lineNum">    1149 </span>            :         const TValue *slot;
<span class="lineNum">    1150 </span><span class="lineCov">      41825 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1151 </span><span class="lineCov">      41825 :         TValue *rc = vRC(i);</span>
<span class="lineNum">    1152 </span>            :         lua_Unsigned n;
<span class="lineNum">    1153 </span><span class="lineCov">      83650 :         if (ttisinteger(rc)  /* fast track for integers? */</span>
<span class="lineNum">    1154 </span><span class="lineCov">      41588 :             ? (cast_void(n = ivalue(rc)), luaV_fastgeti(L, rb, n, slot))</span>
<span class="lineNum">    1155 </span><span class="lineCov">        237 :             : luaV_fastget(L, rb, rc, slot, luaH_get)) {</span>
<span class="lineNum">    1156 </span><span class="lineCov">      41646 :           setobj2s(L, ra, slot);</span>
<span class="lineNum">    1157 </span>            :         }
<span class="lineNum">    1158 </span>            :         else
<span class="lineNum">    1159 </span><span class="lineCov">        179 :           Protect(luaV_finishget(L, rb, rc, ra, slot));</span>
<span class="lineNum">    1160 </span><span class="lineCov">      41825 :         vmbreak;</span>
<span class="lineNum">    1161 </span>            :       }
<span class="lineNum">    1162 </span><span class="lineCov">         57 :       vmcase(OP_GETI) {</span>
<span class="lineNum">    1163 </span>            :         const TValue *slot;
<span class="lineNum">    1164 </span><span class="lineCov">         57 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1165 </span><span class="lineCov">         57 :         int c = GETARG_C(i);</span>
<span class="lineNum">    1166 </span><span class="lineCov">         57 :         if (luaV_fastgeti(L, rb, c, slot)) {</span>
<span class="lineNum">    1167 </span><span class="lineCov">         42 :           setobj2s(L, ra, slot);</span>
<span class="lineNum">    1168 </span>            :         }
<span class="lineNum">    1169 </span>            :         else {
<span class="lineNum">    1170 </span>            :           TValue key;
<span class="lineNum">    1171 </span><span class="lineCov">         15 :           setivalue(&amp;key, c);</span>
<span class="lineNum">    1172 </span><span class="lineCov">         15 :           Protect(luaV_finishget(L, rb, &amp;key, ra, slot));</span>
<span class="lineNum">    1173 </span>            :         }
<span class="lineNum">    1174 </span><span class="lineCov">         51 :         vmbreak;</span>
<span class="lineNum">    1175 </span>            :       }
<span class="lineNum">    1176 </span><span class="lineCov">      31257 :       vmcase(OP_GETFIELD) {</span>
<span class="lineNum">    1177 </span>            :         const TValue *slot;
<span class="lineNum">    1178 </span><span class="lineCov">      31257 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1179 </span><span class="lineCov">      31257 :         TValue *rc = KC(i);</span>
<span class="lineNum">    1180 </span><span class="lineCov">      31257 :         TString *key = tsvalue(rc);  /* key must be a string */</span>
<span class="lineNum">    1181 </span><span class="lineCov">      31257 :         if (luaV_fastget(L, rb, key, slot, luaH_getshortstr)) {</span>
<span class="lineNum">    1182 </span><span class="lineCov">      31205 :           setobj2s(L, ra, slot);</span>
<span class="lineNum">    1183 </span>            :         }
<span class="lineNum">    1184 </span>            :         else
<span class="lineNum">    1185 </span><span class="lineCov">         52 :           Protect(luaV_finishget(L, rb, rc, ra, slot));</span>
<span class="lineNum">    1186 </span><span class="lineCov">      31257 :         vmbreak;</span>
<span class="lineNum">    1187 </span>            :       }
<span class="lineNum">    1188 </span><span class="lineCov">        895 :       vmcase(OP_SETTABUP) {</span>
<span class="lineNum">    1189 </span>            :         const TValue *slot;
<span class="lineNum">    1190 </span><span class="lineCov">        895 :         TValue *upval = cl-&gt;upvals[GETARG_A(i)]-&gt;v;</span>
<span class="lineNum">    1191 </span><span class="lineCov">        895 :         TValue *rb = KB(i);</span>
<span class="lineNum">    1192 </span><span class="lineCov">        895 :         TValue *rc = RKC(i);</span>
<span class="lineNum">    1193 </span><span class="lineCov">        895 :         TString *key = tsvalue(rb);  /* key must be a string */</span>
<span class="lineNum">    1194 </span><span class="lineCov">        895 :         if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) {</span>
<span class="lineNum">    1195 </span><span class="lineCov">         19 :           luaV_finishfastset(L, upval, slot, rc);</span>
<span class="lineNum">    1196 </span>            :         }
<span class="lineNum">    1197 </span>            :         else
<span class="lineNum">    1198 </span><span class="lineCov">        876 :           Protect(luaV_finishset(L, upval, rb, rc, slot));</span>
<span class="lineNum">    1199 </span><span class="lineCov">        894 :         vmbreak;</span>
<span class="lineNum">    1200 </span>            :       }
<span class="lineNum">    1201 </span><span class="lineCov">      82243 :       vmcase(OP_SETTABLE) {</span>
<span class="lineNum">    1202 </span>            :         const TValue *slot;
<span class="lineNum">    1203 </span><span class="lineCov">      82243 :         TValue *rb = vRB(i);  /* key (table is in 'ra') */</span>
<span class="lineNum">    1204 </span><span class="lineCov">      82243 :         TValue *rc = RKC(i);  /* value */</span>
<span class="lineNum">    1205 </span>            :         lua_Unsigned n;
<span class="lineNum">    1206 </span><span class="lineCov">     164486 :         if (ttisinteger(rb)  /* fast track for integers? */</span>
<span class="lineNum">    1207 </span><span class="lineCov">      82232 :             ? (cast_void(n = ivalue(rb)), luaV_fastgeti(L, s2v(ra), n, slot))</span>
<span class="lineNum">    1208 </span><span class="lineCov">         11 :             : luaV_fastget(L, s2v(ra), rb, slot, luaH_get)) {</span>
<span class="lineNum">    1209 </span><span class="lineCov">      40790 :           luaV_finishfastset(L, s2v(ra), slot, rc);</span>
<span class="lineNum">    1210 </span>            :         }
<span class="lineNum">    1211 </span>            :         else
<span class="lineNum">    1212 </span><span class="lineCov">      41453 :           Protect(luaV_finishset(L, s2v(ra), rb, rc, slot));</span>
<span class="lineNum">    1213 </span><span class="lineCov">      82241 :         vmbreak;</span>
<span class="lineNum">    1214 </span>            :       }
<span class="lineNum">    1215 </span><span class="lineCov">         22 :       vmcase(OP_SETI) {</span>
<span class="lineNum">    1216 </span>            :         const TValue *slot;
<span class="lineNum">    1217 </span><span class="lineCov">         22 :         int c = GETARG_B(i);</span>
<span class="lineNum">    1218 </span><span class="lineCov">         22 :         TValue *rc = RKC(i);</span>
<span class="lineNum">    1219 </span><span class="lineCov">         22 :         if (luaV_fastgeti(L, s2v(ra), c, slot)) {</span>
<span class="lineNum">    1220 </span><span class="lineCov">          4 :           luaV_finishfastset(L, s2v(ra), slot, rc);</span>
<span class="lineNum">    1221 </span>            :         }
<span class="lineNum">    1222 </span>            :         else {
<span class="lineNum">    1223 </span>            :           TValue key;
<span class="lineNum">    1224 </span><span class="lineCov">         18 :           setivalue(&amp;key, c);</span>
<span class="lineNum">    1225 </span><span class="lineCov">         18 :           Protect(luaV_finishset(L, s2v(ra), &amp;key, rc, slot));</span>
<span class="lineNum">    1226 </span>            :         }
<span class="lineNum">    1227 </span><span class="lineCov">         13 :         vmbreak;</span>
<span class="lineNum">    1228 </span>            :       }
<span class="lineNum">    1229 </span><span class="lineCov">        501 :       vmcase(OP_SETFIELD) {</span>
<span class="lineNum">    1230 </span>            :         const TValue *slot;
<span class="lineNum">    1231 </span><span class="lineCov">        501 :         TValue *rb = KB(i);</span>
<span class="lineNum">    1232 </span><span class="lineCov">        501 :         TValue *rc = RKC(i);</span>
<span class="lineNum">    1233 </span><span class="lineCov">        501 :         TString *key = tsvalue(rb);  /* key must be a string */</span>
<span class="lineNum">    1234 </span><span class="lineCov">        501 :         if (luaV_fastget(L, s2v(ra), key, slot, luaH_getshortstr)) {</span>
<span class="lineNum">    1235 </span><span class="lineCov">         15 :           luaV_finishfastset(L, s2v(ra), slot, rc);</span>
<span class="lineNum">    1236 </span>            :         }
<span class="lineNum">    1237 </span>            :         else
<span class="lineNum">    1238 </span><span class="lineCov">        486 :           Protect(luaV_finishset(L, s2v(ra), rb, rc, slot));</span>
<span class="lineNum">    1239 </span><span class="lineCov">        501 :         vmbreak;</span>
<span class="lineNum">    1240 </span>            :       }
<span class="lineNum">    1241 </span><span class="lineCov">       6615 :       vmcase(OP_NEWTABLE) {</span>
<span class="lineNum">    1242 </span><span class="lineCov">       6615 :         int b = GETARG_B(i);</span>
<span class="lineNum">    1243 </span><span class="lineCov">       6615 :         int c = GETARG_C(i);</span>
<span class="lineNum">    1244 </span>            :         Table *t;
<span class="lineNum">    1245 </span><span class="lineCov">       6615 :         L-&gt;top = ci-&gt;top;  /* correct top in case of GC */</span>
<span class="lineNum">    1246 </span><span class="lineCov">       6615 :         t = luaH_new(L);  /* memory allocation */</span>
<span class="lineNum">    1247 </span><span class="lineCov">       6615 :         sethvalue2s(L, ra, t);</span>
<span class="lineNum">    1248 </span><span class="lineCov">       6615 :         if (b != 0 || c != 0)</span>
<span class="lineNum">    1249 </span><span class="lineCov">        261 :           luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c));  /* idem */</span>
<span class="lineNum">    1250 </span><span class="lineCov">       6615 :         checkGC(L, ra + 1);</span>
<span class="lineNum">    1251 </span><span class="lineCov">       6615 :         vmbreak;</span>
<span class="lineNum">    1252 </span>            :       }
<span class="lineNum">    1253 </span><span class="lineCov">       7352 :       vmcase(OP_SELF) {</span>
<span class="lineNum">    1254 </span>            :         const TValue *slot;
<span class="lineNum">    1255 </span><span class="lineCov">       7352 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1256 </span><span class="lineCov">       7352 :         TValue *rc = RKC(i);</span>
<span class="lineNum">    1257 </span><span class="lineCov">       7352 :         TString *key = tsvalue(rc);  /* key must be a string */</span>
<span class="lineNum">    1258 </span><span class="lineCov">       7352 :         setobj2s(L, ra + 1, rb);</span>
<span class="lineNum">    1259 </span><span class="lineCov">       7352 :         if (luaV_fastget(L, rb, key, slot, luaH_getstr)) {</span>
<span class="lineNum">    1260 </span><span class="lineCov">          8 :           setobj2s(L, ra, slot);</span>
<span class="lineNum">    1261 </span>            :         }
<span class="lineNum">    1262 </span>            :         else
<span class="lineNum">    1263 </span><span class="lineCov">       7344 :           Protect(luaV_finishget(L, rb, rc, ra, slot));</span>
<span class="lineNum">    1264 </span><span class="lineCov">       7352 :         vmbreak;</span>
<span class="lineNum">    1265 </span>            :       }
<span class="lineNum">    1266 </span><span class="lineCov">      14239 :       vmcase(OP_ADDI) {</span>
<span class="lineNum">    1267 </span><span class="lineCov">      14239 :         op_arithI(L, l_addi, luai_numadd, TM_ADD, GETARG_k(i));</span>
<span class="lineNum">    1268 </span><span class="lineCov">      14229 :         vmbreak;</span>
<span class="lineNum">    1269 </span>            :       }
<span class="lineNum">    1270 </span><span class="lineCov">      10931 :       vmcase(OP_SUBI) {</span>
<span class="lineNum">    1271 </span><span class="lineCov">      10931 :         op_arithI(L, l_subi, luai_numsub, TM_SUB, 0);</span>
<span class="lineNum">    1272 </span><span class="lineCov">      10924 :         vmbreak;</span>
<span class="lineNum">    1273 </span>            :       }
<span class="lineNum">    1274 </span><span class="lineCov">       1038 :       vmcase(OP_MULI) {</span>
<span class="lineNum">    1275 </span><span class="lineCov">       1038 :         op_arithI(L, l_muli, luai_nummul, TM_MUL, GETARG_k(i));</span>
<span class="lineNum">    1276 </span><span class="lineCov">       1036 :         vmbreak;</span>
<span class="lineNum">    1277 </span>            :       }
<span class="lineNum">    1278 </span><span class="lineCov">          9 :       vmcase(OP_MODI) {</span>
<span class="lineNum">    1279 </span><span class="lineCov">          9 :         op_arithI(L, luaV_mod, luaV_modf, TM_MOD, 0);</span>
<span class="lineNum">    1280 </span><span class="lineCov">          1 :         vmbreak;</span>
<span class="lineNum">    1281 </span>            :       }
<span class="lineNum">    1282 </span><span class="lineCov">         12 :       vmcase(OP_POWI) {</span>
<span class="lineNum">    1283 </span><span class="lineCov">         12 :         op_arithfI(L, luai_numpow, TM_POW);</span>
<span class="lineNum">    1284 </span><span class="lineCov">          5 :         vmbreak;</span>
<span class="lineNum">    1285 </span>            :       }
<span class="lineNum">    1286 </span><span class="lineCov">         18 :       vmcase(OP_DIVI) {</span>
<span class="lineNum">    1287 </span><span class="lineCov">         18 :         op_arithfI(L, luai_numdiv, TM_DIV);</span>
<span class="lineNum">    1288 </span><span class="lineCov">         11 :         vmbreak;</span>
<span class="lineNum">    1289 </span>            :       }
<span class="lineNum">    1290 </span><span class="lineCov">         10 :       vmcase(OP_IDIVI) {</span>
<span class="lineNum">    1291 </span><span class="lineCov">         10 :         op_arithI(L, luaV_idiv, luai_numidiv, TM_IDIV, 0);</span>
<span class="lineNum">    1292 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1293 </span>            :       }
<span class="lineNum">    1294 </span><span class="lineNoCov">          0 :       vmcase(OP_ADDK) {</span>
<span class="lineNum">    1295 </span><span class="lineNoCov">          0 :         op_arithK(L, l_addi, luai_numadd, TM_ADD, GETARG_k(i));</span>
<span class="lineNum">    1296 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1297 </span>            :       }
<span class="lineNum">    1298 </span><span class="lineCov">          1 :       vmcase(OP_SUBK) {</span>
<span class="lineNum">    1299 </span><span class="lineCov">          1 :         op_arithK(L, l_subi, luai_numsub, TM_SUB, 0);</span>
<span class="lineNum">    1300 </span><span class="lineCov">          1 :         vmbreak;</span>
<span class="lineNum">    1301 </span>            :       }
<span class="lineNum">    1302 </span><span class="lineCov">         10 :       vmcase(OP_MULK) {</span>
<span class="lineNum">    1303 </span><span class="lineCov">         10 :         op_arithK(L, l_muli, luai_nummul, TM_MUL, GETARG_k(i));</span>
<span class="lineNum">    1304 </span><span class="lineCov">          1 :         vmbreak;</span>
<span class="lineNum">    1305 </span>            :       }
<span class="lineNum">    1306 </span><span class="lineCov">          1 :       vmcase(OP_MODK) {</span>
<span class="lineNum">    1307 </span><span class="lineCov">          1 :         op_arithK(L, luaV_mod, luaV_modf, TM_MOD, 0);</span>
<span class="lineNum">    1308 </span><span class="lineCov">          1 :         vmbreak;</span>
<span class="lineNum">    1309 </span>            :       }
<span class="lineNum">    1310 </span><span class="lineCov">          2 :       vmcase(OP_POWK) {</span>
<span class="lineNum">    1311 </span><span class="lineCov">          2 :         op_arithfK(L, luai_numpow, TM_POW);</span>
<span class="lineNum">    1312 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1313 </span>            :       }
<span class="lineNum">    1314 </span><span class="lineCov">          2 :       vmcase(OP_DIVK) {</span>
<span class="lineNum">    1315 </span><span class="lineCov">          2 :         op_arithfK(L, luai_numdiv, TM_DIV);</span>
<span class="lineNum">    1316 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1317 </span>            :       }
<span class="lineNum">    1318 </span><span class="lineCov">          1 :       vmcase(OP_IDIVK) {</span>
<span class="lineNum">    1319 </span><span class="lineCov">          1 :         op_arithK(L, luaV_idiv, luai_numidiv, TM_IDIV, 0);</span>
<span class="lineNum">    1320 </span><span class="lineCov">          1 :         vmbreak;</span>
<span class="lineNum">    1321 </span>            :       }
<span class="lineNum">    1322 </span><span class="lineCov">        391 :       vmcase(OP_ADD) {</span>
<span class="lineNum">    1323 </span><span class="lineCov">        391 :         op_arith(L, l_addi, luai_numadd, TM_ADD);</span>
<span class="lineNum">    1324 </span><span class="lineCov">        389 :         vmbreak;</span>
<span class="lineNum">    1325 </span>            :       }
<span class="lineNum">    1326 </span><span class="lineCov">        136 :       vmcase(OP_SUB) {</span>
<span class="lineNum">    1327 </span><span class="lineCov">        136 :         op_arith(L, l_subi, luai_numsub, TM_SUB);</span>
<span class="lineNum">    1328 </span><span class="lineCov">        132 :         vmbreak;</span>
<span class="lineNum">    1329 </span>            :       }
<span class="lineNum">    1330 </span><span class="lineCov">        121 :       vmcase(OP_MUL) {</span>
<span class="lineNum">    1331 </span><span class="lineCov">        121 :         op_arith(L, l_muli, luai_nummul, TM_MUL);</span>
<span class="lineNum">    1332 </span><span class="lineCov">        118 :         vmbreak;</span>
<span class="lineNum">    1333 </span>            :       }
<span class="lineNum">    1334 </span><span class="lineCov">          6 :       vmcase(OP_MOD) {</span>
<span class="lineNum">    1335 </span><span class="lineCov">          6 :         op_arith(L, luaV_mod, luaV_modf, TM_MOD);</span>
<span class="lineNum">    1336 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1337 </span>            :       }
<span class="lineNum">    1338 </span><span class="lineCov">          6 :       vmcase(OP_POW) {</span>
<span class="lineNum">    1339 </span><span class="lineCov">          6 :         op_arithf(L, luai_numpow, TM_POW);</span>
<span class="lineNum">    1340 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1341 </span>            :       }
<span class="lineNum">    1342 </span><span class="lineCov">         20 :       vmcase(OP_DIV) {  /* float division (always with floats) */</span>
<span class="lineNum">    1343 </span><span class="lineCov">         20 :         op_arithf(L, luai_numdiv, TM_DIV);</span>
<span class="lineNum">    1344 </span><span class="lineCov">         16 :         vmbreak;</span>
<span class="lineNum">    1345 </span>            :       }
<span class="lineNum">    1346 </span><span class="lineCov">          8 :       vmcase(OP_IDIV) {  /* floor division */</span>
<span class="lineNum">    1347 </span><span class="lineCov">          8 :         op_arith(L, luaV_idiv, luai_numidiv, TM_IDIV);</span>
<span class="lineNum">    1348 </span><span class="lineCov">          4 :         vmbreak;</span>
<span class="lineNum">    1349 </span>            :       }
<span class="lineNum">    1350 </span><span class="lineCov">         13 :       vmcase(OP_BANDK) {</span>
<span class="lineNum">    1351 </span><span class="lineCov">         13 :         op_bitwiseK(L, l_band, TM_BAND);</span>
<span class="lineNum">    1352 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1353 </span>            :       }
<span class="lineNum">    1354 </span><span class="lineCov">         13 :       vmcase(OP_BORK) {</span>
<span class="lineNum">    1355 </span><span class="lineCov">         13 :         op_bitwiseK(L, l_bor, TM_BOR);</span>
<span class="lineNum">    1356 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1357 </span>            :       }
<span class="lineNum">    1358 </span><span class="lineCov">         13 :       vmcase(OP_BXORK) {</span>
<span class="lineNum">    1359 </span><span class="lineCov">         13 :         op_bitwiseK(L, l_bxor, TM_BXOR);</span>
<span class="lineNum">    1360 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1361 </span>            :       }
<span class="lineNum">    1362 </span><span class="lineCov">          3 :       vmcase(OP_BAND) {</span>
<span class="lineNum">    1363 </span><span class="lineCov">          3 :         op_bitwise(L, l_band, TM_BAND);</span>
<span class="lineNum">    1364 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1365 </span>            :       }
<span class="lineNum">    1366 </span><span class="lineCov">          3 :       vmcase(OP_BOR) {</span>
<span class="lineNum">    1367 </span><span class="lineCov">          3 :         op_bitwise(L, l_bor, TM_BOR);</span>
<span class="lineNum">    1368 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1369 </span>            :       }
<span class="lineNum">    1370 </span><span class="lineCov">          3 :       vmcase(OP_BXOR) {</span>
<span class="lineNum">    1371 </span><span class="lineCov">          3 :         op_bitwise(L, l_bxor, TM_BXOR);</span>
<span class="lineNum">    1372 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1373 </span>            :       }
<span class="lineNum">    1374 </span><span class="lineCov">         18 :       vmcase(OP_SHRI) {</span>
<span class="lineNum">    1375 </span><span class="lineCov">         18 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1376 </span><span class="lineCov">         18 :         int ic = GETARG_sC(i);</span>
<span class="lineNum">    1377 </span>            :         lua_Integer ib;
<span class="lineNum">    1378 </span><span class="lineCov">         18 :         if (tointegerns(rb, &amp;ib)) {</span>
<span class="lineNum">    1379 </span><span class="lineNoCov">          0 :           setivalue(s2v(ra), luaV_shiftl(ib, -ic));</span>
<span class="lineNum">    1380 </span>            :         }
<span class="lineNum">    1381 </span>            :         else {
<span class="lineNum">    1382 </span><span class="lineCov">         18 :           TMS ev = TM_SHR;</span>
<span class="lineNum">    1383 </span><span class="lineCov">         18 :           if (TESTARG_k(i)) {</span>
<span class="lineNum">    1384 </span><span class="lineCov">          9 :             ic = -ic;  ev = TM_SHL;</span>
<span class="lineNum">    1385 </span>            :           }
<span class="lineNum">    1386 </span><span class="lineCov">         18 :           Protect(luaT_trybiniTM(L, rb, ic, 0, ra, ev));</span>
<span class="lineNum">    1387 </span>            :         }
<span class="lineNum">    1388 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1389 </span>            :       }
<span class="lineNum">    1390 </span><span class="lineCov">          4 :       vmcase(OP_SHLI) {</span>
<span class="lineNum">    1391 </span><span class="lineCov">          4 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1392 </span><span class="lineCov">          4 :         int ic = GETARG_sC(i);</span>
<span class="lineNum">    1393 </span>            :         lua_Integer ib;
<span class="lineNum">    1394 </span><span class="lineCov">          4 :         if (tointegerns(rb, &amp;ib)) {</span>
<span class="lineNum">    1395 </span><span class="lineNoCov">          0 :           setivalue(s2v(ra), luaV_shiftl(ic, ib));</span>
<span class="lineNum">    1396 </span>            :         }
<span class="lineNum">    1397 </span>            :         else
<span class="lineNum">    1398 </span><span class="lineCov">          4 :           Protect(luaT_trybiniTM(L, rb, ic, 1, ra, TM_SHL));</span>
<span class="lineNum">    1399 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1400 </span>            :       }
<span class="lineNum">    1401 </span><span class="lineCov">          7 :       vmcase(OP_SHR) {</span>
<span class="lineNum">    1402 </span><span class="lineCov">          7 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1403 </span><span class="lineCov">          7 :         TValue *rc = vRC(i);</span>
<span class="lineNum">    1404 </span>            :         lua_Integer ib; lua_Integer ic;
<span class="lineNum">    1405 </span><span class="lineCov">          7 :         if (tointegerns(rb, &amp;ib) &amp;&amp; tointegerns(rc, &amp;ic)) {</span>
<span class="lineNum">    1406 </span><span class="lineNoCov">          0 :           setivalue(s2v(ra), luaV_shiftl(ib, -ic));</span>
<span class="lineNum">    1407 </span>            :         }
<span class="lineNum">    1408 </span>            :         else
<span class="lineNum">    1409 </span><span class="lineCov">          7 :           Protect(luaT_trybinTM(L, rb, rc, ra, TM_SHR));</span>
<span class="lineNum">    1410 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1411 </span>            :       }
<span class="lineNum">    1412 </span><span class="lineCov">          3 :       vmcase(OP_SHL) {</span>
<span class="lineNum">    1413 </span><span class="lineCov">          3 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1414 </span><span class="lineCov">          3 :         TValue *rc = vRC(i);</span>
<span class="lineNum">    1415 </span>            :         lua_Integer ib; lua_Integer ic;
<span class="lineNum">    1416 </span><span class="lineCov">          3 :         if (tointegerns(rb, &amp;ib) &amp;&amp; tointegerns(rc, &amp;ic)) {</span>
<span class="lineNum">    1417 </span><span class="lineNoCov">          0 :           setivalue(s2v(ra), luaV_shiftl(ib, ic));</span>
<span class="lineNum">    1418 </span>            :         }
<span class="lineNum">    1419 </span>            :         else
<span class="lineNum">    1420 </span><span class="lineCov">          3 :           Protect(luaT_trybinTM(L, rb, rc, ra, TM_SHL));</span>
<span class="lineNum">    1421 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1422 </span>            :       }
<span class="lineNum">    1423 </span><span class="lineCov">         13 :       vmcase(OP_UNM) {</span>
<span class="lineNum">    1424 </span><span class="lineCov">         13 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1425 </span>            :         lua_Number nb;
<span class="lineNum">    1426 </span><span class="lineCov">         13 :         if (ttisinteger(rb)) {</span>
<span class="lineNum">    1427 </span><span class="lineCov">          2 :           lua_Integer ib = ivalue(rb);</span>
<span class="lineNum">    1428 </span><span class="lineCov">          2 :           setivalue(s2v(ra), intop(-, 0, ib));</span>
<span class="lineNum">    1429 </span>            :         }
<span class="lineNum">    1430 </span><span class="lineCov">         11 :         else if (tonumberns(rb, nb)) {</span>
<span class="lineNum">    1431 </span><span class="lineCov">          1 :           setfltvalue(s2v(ra), luai_numunm(L, nb));</span>
<span class="lineNum">    1432 </span>            :         }
<span class="lineNum">    1433 </span>            :         else
<span class="lineNum">    1434 </span><span class="lineCov">         10 :           Protect(luaT_trybinTM(L, rb, rb, ra, TM_UNM));</span>
<span class="lineNum">    1435 </span><span class="lineCov">          5 :         vmbreak;</span>
<span class="lineNum">    1436 </span>            :       }
<span class="lineNum">    1437 </span><span class="lineCov">         10 :       vmcase(OP_BNOT) {</span>
<span class="lineNum">    1438 </span><span class="lineCov">         10 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1439 </span>            :         lua_Integer ib;
<span class="lineNum">    1440 </span><span class="lineCov">         10 :         if (tointegerns(rb, &amp;ib)) {</span>
<span class="lineNum">    1441 </span><span class="lineNoCov">          0 :           setivalue(s2v(ra), intop(^, ~l_castS2U(0), ib));</span>
<span class="lineNum">    1442 </span>            :         }
<span class="lineNum">    1443 </span>            :         else
<span class="lineNum">    1444 </span><span class="lineCov">         10 :           Protect(luaT_trybinTM(L, rb, rb, ra, TM_BNOT));</span>
<span class="lineNum">    1445 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1446 </span>            :       }
<span class="lineNum">    1447 </span><span class="lineCov">          7 :       vmcase(OP_NOT) {</span>
<span class="lineNum">    1448 </span><span class="lineCov">          7 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1449 </span><span class="lineCov">          7 :         int nrb = l_isfalse(rb);  /* next assignment may change this value */</span>
<span class="lineNum">    1450 </span><span class="lineCov">          7 :         setbvalue(s2v(ra), nrb);</span>
<span class="lineNum">    1451 </span><span class="lineCov">          7 :         vmbreak;</span>
<span class="lineNum">    1452 </span>            :       }
<span class="lineNum">    1453 </span><span class="lineCov">        672 :       vmcase(OP_LEN) {</span>
<span class="lineNum">    1454 </span><span class="lineCov">        672 :         Protect(luaV_objlen(L, ra, vRB(i)));</span>
<span class="lineNum">    1455 </span><span class="lineCov">        666 :         vmbreak;</span>
<span class="lineNum">    1456 </span>            :       }
<span class="lineNum">    1457 </span><span class="lineCov">       8329 :       vmcase(OP_CONCAT) {</span>
<span class="lineNum">    1458 </span><span class="lineCov">       8329 :         int n = GETARG_B(i);  /* number of elements to concatenate */</span>
<span class="lineNum">    1459 </span><span class="lineCov">       8329 :         L-&gt;top = ra + n;  /* mark the end of concat operands */</span>
<span class="lineNum">    1460 </span><span class="lineCov">       8329 :         ProtectNT(luaV_concat(L, n));</span>
<span class="lineNum">    1461 </span><span class="lineCov">       8320 :         checkGC(L, L-&gt;top); /* 'luaV_concat' ensures correct top */</span>
<span class="lineNum">    1462 </span><span class="lineCov">       8320 :         vmbreak;</span>
<span class="lineNum">    1463 </span>            :       }
<span class="lineNum">    1464 </span><span class="lineCov">       6366 :       vmcase(OP_CLOSE) {</span>
<span class="lineNum">    1465 </span><span class="lineCov">       6366 :         L-&gt;top = ra + 1;  /* everything is free after this slot */</span>
<span class="lineNum">    1466 </span><span class="lineCov">       6366 :         Protect(luaF_close(L, ra, LUA_OK));</span>
<span class="lineNum">    1467 </span><span class="lineCov">       6365 :         vmbreak;</span>
<span class="lineNum">    1468 </span>            :       }
<span class="lineNum">    1469 </span><span class="lineCov">          2 :       vmcase(OP_TBC) {</span>
<span class="lineNum">    1470 </span>            :         /* create new to-be-closed upvalue */
<span class="lineNum">    1471 </span><span class="lineCov">          2 :         halfProtect(luaF_newtbcupval(L, ra));</span>
<span class="lineNum">    1472 </span><span class="lineCov">          2 :         vmbreak;</span>
<span class="lineNum">    1473 </span>            :       }
<span class="lineNum">    1474 </span><span class="lineCov">      12275 :       vmcase(OP_JMP) {</span>
<span class="lineNum">    1475 </span><span class="lineCov">      12275 :         dojump(ci, i, 0);</span>
<span class="lineNum">    1476 </span><span class="lineCov">      12275 :         vmbreak;</span>
<span class="lineNum">    1477 </span>            :       }
<span class="lineNum">    1478 </span><span class="lineCov">       7496 :       vmcase(OP_EQ) {</span>
<span class="lineNum">    1479 </span>            :         int cond;
<span class="lineNum">    1480 </span><span class="lineCov">       7496 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1481 </span><span class="lineCov">       7496 :         Protect(cond = luaV_equalobj(L, s2v(ra), rb));</span>
<span class="lineNum">    1482 </span><span class="lineCov">       7493 :         docondjump();</span>
<span class="lineNum">    1483 </span><span class="lineCov">       7493 :         vmbreak;</span>
<span class="lineNum">    1484 </span>            :       }
<span class="lineNum">    1485 </span><span class="lineCov">         56 :       vmcase(OP_LT) {</span>
<span class="lineNum">    1486 </span><span class="lineCov">         56 :         op_order(L, l_lti, LTnum, lessthanothers);</span>
<span class="lineNum">    1487 </span><span class="lineCov">         39 :         vmbreak;</span>
<span class="lineNum">    1488 </span>            :       }
<span class="lineNum">    1489 </span><span class="lineCov">        122 :       vmcase(OP_LE) {</span>
<span class="lineNum">    1490 </span><span class="lineCov">        122 :         op_order(L, l_lei, LEnum, lessequalothers);</span>
<span class="lineNum">    1491 </span><span class="lineCov">        107 :         vmbreak;</span>
<span class="lineNum">    1492 </span>            :       }
<span class="lineNum">    1493 </span><span class="lineCov">      17487 :       vmcase(OP_EQK) {</span>
<span class="lineNum">    1494 </span><span class="lineCov">      17487 :         TValue *rb = KB(i);</span>
<span class="lineNum">    1495 </span>            :         /* basic types do not use '__eq'; we can use raw equality */
<span class="lineNum">    1496 </span><span class="lineCov">      17487 :         int cond = luaV_equalobj(NULL, s2v(ra), rb);</span>
<span class="lineNum">    1497 </span><span class="lineCov">      17487 :         docondjump();</span>
<span class="lineNum">    1498 </span><span class="lineCov">      17487 :         vmbreak;</span>
<span class="lineNum">    1499 </span>            :       }
<span class="lineNum">    1500 </span><span class="lineCov">        462 :       vmcase(OP_EQI) {</span>
<span class="lineNum">    1501 </span>            :         int cond;
<span class="lineNum">    1502 </span><span class="lineCov">        462 :         int im = GETARG_sB(i);</span>
<span class="lineNum">    1503 </span><span class="lineCov">        462 :         if (ttisinteger(s2v(ra)))</span>
<span class="lineNum">    1504 </span><span class="lineCov">        447 :           cond = (ivalue(s2v(ra)) == im);</span>
<span class="lineNum">    1505 </span><span class="lineCov">         15 :         else if (ttisfloat(s2v(ra)))</span>
<span class="lineNum">    1506 </span><span class="lineNoCov">          0 :           cond = luai_numeq(fltvalue(s2v(ra)), cast_num(im));</span>
<span class="lineNum">    1507 </span>            :         else
<span class="lineNum">    1508 </span><span class="lineCov">         15 :           cond = 0;  /* other types cannot be equal to a number */</span>
<span class="lineNum">    1509 </span><span class="lineCov">        462 :         docondjump();</span>
<span class="lineNum">    1510 </span><span class="lineCov">        462 :         vmbreak;</span>
<span class="lineNum">    1511 </span>            :       }
<span class="lineNum">    1512 </span><span class="lineCov">         16 :       vmcase(OP_LTI) {</span>
<span class="lineNum">    1513 </span><span class="lineCov">         16 :         op_orderI(L, l_lti, luai_numlt, 0, TM_LT);</span>
<span class="lineNum">    1514 </span><span class="lineCov">          5 :         vmbreak;</span>
<span class="lineNum">    1515 </span>            :       }
<span class="lineNum">    1516 </span><span class="lineCov">      10912 :       vmcase(OP_LEI) {</span>
<span class="lineNum">    1517 </span><span class="lineCov">      10912 :         op_orderI(L, l_lei, luai_numle, 0, TM_LE);</span>
<span class="lineNum">    1518 </span><span class="lineCov">      10902 :         vmbreak;</span>
<span class="lineNum">    1519 </span>            :       }
<span class="lineNum">    1520 </span><span class="lineCov">         41 :       vmcase(OP_GTI) {</span>
<span class="lineNum">    1521 </span><span class="lineCov">         41 :         op_orderI(L, l_gti, luai_numgt, 1, TM_LT);</span>
<span class="lineNum">    1522 </span><span class="lineCov">         26 :         vmbreak;</span>
<span class="lineNum">    1523 </span>            :       }
<span class="lineNum">    1524 </span><span class="lineCov">          6 :       vmcase(OP_GEI) {</span>
<span class="lineNum">    1525 </span><span class="lineCov">          6 :         op_orderI(L, l_gei, luai_numge, 1, TM_LE);</span>
<span class="lineNum">    1526 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1527 </span>            :       }
<span class="lineNum">    1528 </span><span class="lineCov">      18957 :       vmcase(OP_TEST) {</span>
<span class="lineNum">    1529 </span><span class="lineCov">      18957 :         int cond = !l_isfalse(s2v(ra));</span>
<span class="lineNum">    1530 </span><span class="lineCov">      18957 :         docondjump();</span>
<span class="lineNum">    1531 </span><span class="lineCov">      18957 :         vmbreak;</span>
<span class="lineNum">    1532 </span>            :       }
<span class="lineNum">    1533 </span><span class="lineCov">          4 :       vmcase(OP_TESTSET) {</span>
<span class="lineNum">    1534 </span><span class="lineCov">          4 :         TValue *rb = vRB(i);</span>
<span class="lineNum">    1535 </span><span class="lineCov">          4 :         if (l_isfalse(rb) == GETARG_k(i))</span>
<span class="lineNum">    1536 </span><span class="lineCov">          1 :           pc++;</span>
<span class="lineNum">    1537 </span>            :         else {
<span class="lineNum">    1538 </span><span class="lineCov">          3 :           setobj2s(L, ra, rb);</span>
<span class="lineNum">    1539 </span><span class="lineCov">          3 :           donextjump(ci);</span>
<span class="lineNum">    1540 </span>            :         }
<span class="lineNum">    1541 </span><span class="lineCov">          4 :         vmbreak;</span>
<span class="lineNum">    1542 </span>            :       }
<span class="lineNum">    1543 </span><span class="lineCov">      71894 :       vmcase(OP_CALL) {</span>
<span class="lineNum">    1544 </span><span class="lineCov">      71894 :         int b = GETARG_B(i);</span>
<span class="lineNum">    1545 </span><span class="lineCov">      71894 :         int nresults = GETARG_C(i) - 1;</span>
<span class="lineNum">    1546 </span><span class="lineCov">      71894 :         if (b != 0)  /* fixed number of arguments? */</span>
<span class="lineNum">    1547 </span><span class="lineCov">      65861 :           L-&gt;top = ra + b;  /* top signals number of arguments */</span>
<span class="lineNum">    1548 </span>            :         /* else previous instruction set top */
<span class="lineNum">    1549 </span><span class="lineCov">      71894 :         ProtectNT(luaD_call(L, ra, nresults));</span>
<span class="lineNum">    1550 </span><span class="lineCov">      55621 :         vmbreak;</span>
<span class="lineNum">    1551 </span>            :       }
<span class="lineNum">    1552 </span><span class="lineCov">       1272 :       vmcase(OP_TAILCALL) {</span>
<span class="lineNum">    1553 </span><span class="lineCov">       1272 :         int b = GETARG_B(i);  /* number of arguments + 1 (function) */</span>
<span class="lineNum">    1554 </span><span class="lineCov">       1272 :         int delta = 0;  /* virtual 'func' - real 'func' (vararg functions) */</span>
<span class="lineNum">    1555 </span><span class="lineCov">       1272 :         if (b != 0)</span>
<span class="lineNum">    1556 </span><span class="lineCov">       1264 :           L-&gt;top = ra + b;</span>
<span class="lineNum">    1557 </span>            :         else  /* previous instruction set top */
<span class="lineNum">    1558 </span><span class="lineCov">          8 :           b = cast_int(L-&gt;top - ra);</span>
<span class="lineNum">    1559 </span><span class="lineCov">       1272 :         savepc(ci);  /* some calls here can raise errors */</span>
<span class="lineNum">    1560 </span><span class="lineCov">       1272 :         if (TESTARG_k(i)) {</span>
<span class="lineNum">    1561 </span><span class="lineCov">        531 :           int nparams1 = GETARG_C(i);</span>
<span class="lineNum">    1562 </span><span class="lineCov">        531 :           if (nparams1)  /* vararg function? */</span>
<span class="lineNum">    1563 </span><span class="lineCov">        113 :             delta = ci-&gt;u.l.nextraargs + nparams1;</span>
<span class="lineNum">    1564 </span>            :           /* close upvalues from current call; the compiler ensures
<span class="lineNum">    1565 </span>            :              that there are no to-be-closed variables here */
<span class="lineNum">    1566 </span><span class="lineCov">        531 :           luaF_close(L, base, NOCLOSINGMETH);</span>
<span class="lineNum">    1567 </span>            :         }
<span class="lineNum">    1568 </span><span class="lineCov">       1272 :         if (!ttisfunction(s2v(ra))) {  /* not a function? */</span>
<span class="lineNum">    1569 </span><span class="lineNoCov">          0 :           luaD_tryfuncTM(L, ra);  /* try '__call' metamethod */</span>
<span class="lineNum">    1570 </span><span class="lineNoCov">          0 :           b++;  /* there is now one extra argument */</span>
<span class="lineNum">    1571 </span>            :         }
<span class="lineNum">    1572 </span><span class="lineCov">       1272 :         if (!ttisLclosure(s2v(ra))) {  /* C function? */</span>
<span class="lineNum">    1573 </span><span class="lineCov">        121 :           luaD_call(L, ra, LUA_MULTRET);  /* call it */</span>
<span class="lineNum">    1574 </span><span class="lineCov">        111 :           updatetrap(ci);</span>
<span class="lineNum">    1575 </span><span class="lineCov">        111 :           updatestack(ci);  /* stack may have been relocated */</span>
<span class="lineNum">    1576 </span><span class="lineCov">        111 :           ci-&gt;func -= delta;</span>
<span class="lineNum">    1577 </span><span class="lineCov">        111 :           luaD_poscall(L, ci, cast_int(L-&gt;top - ra));</span>
<span class="lineNum">    1578 </span><span class="lineCov">        111 :           return;</span>
<span class="lineNum">    1579 </span>            :         }
<span class="lineNum">    1580 </span>            :         else {  /* Lua tail call */
<span class="lineNum">    1581 </span><span class="lineCov">       1151 :           ci-&gt;func -= delta;</span>
<span class="lineNum">    1582 </span><span class="lineCov">       1151 :           luaD_pretailcall(L, ci, ra, b);  /* prepare call frame */</span>
<span class="lineNum">    1583 </span><span class="lineCov">       1151 :           goto tailcall;</span>
<span class="lineNum">    1584 </span>            :         }
<span class="lineNum">    1585 </span>            :         vmbreak;
<span class="lineNum">    1586 </span>            :       }
<span class="lineNum">    1587 </span><span class="lineCov">        879 :       vmcase(OP_RETURN) {</span>
<span class="lineNum">    1588 </span><span class="lineCov">        879 :         int n = GETARG_B(i) - 1;  /* number of results */</span>
<span class="lineNum">    1589 </span><span class="lineCov">        879 :         if (n &lt; 0)  /* not fixed? */</span>
<span class="lineNum">    1590 </span><span class="lineCov">          8 :           n = cast_int(L-&gt;top - ra);  /* get what is available */</span>
<span class="lineNum">    1591 </span>            :         else
<span class="lineNum">    1592 </span><span class="lineCov">        871 :           L-&gt;top = ra + n;  /* set call for 'luaD_poscall' */</span>
<span class="lineNum">    1593 </span><span class="lineCov">        879 :         savepc(ci);</span>
<span class="lineNum">    1594 </span><span class="lineCov">        879 :         if (TESTARG_k(i)) {</span>
<span class="lineNum">    1595 </span><span class="lineCov">        683 :           int nparams1 = GETARG_C(i);</span>
<span class="lineNum">    1596 </span><span class="lineCov">        683 :           luaF_close(L, base, LUA_OK);  /* there may be open upvalues */</span>
<span class="lineNum">    1597 </span><span class="lineCov">        683 :           if (nparams1)  /* vararg function? */</span>
<span class="lineNum">    1598 </span><span class="lineCov">        356 :             ci-&gt;func -= ci-&gt;u.l.nextraargs + nparams1;</span>
<span class="lineNum">    1599 </span>            :         }
<span class="lineNum">    1600 </span><span class="lineCov">        879 :         luaD_poscall(L, ci, n);</span>
<span class="lineNum">    1601 </span><span class="lineCov">        879 :         return;</span>
<span class="lineNum">    1602 </span>            :       }
<span class="lineNum">    1603 </span><span class="lineCov">      14919 :       vmcase(OP_RETURN0) {</span>
<span class="lineNum">    1604 </span><span class="lineCov">      14919 :         if (L-&gt;hookmask) {</span>
<span class="lineNum">    1605 </span><span class="lineCov">        265 :           L-&gt;top = ra;</span>
<span class="lineNum">    1606 </span><span class="lineCov">        265 :           halfProtect(luaD_poscall(L, ci, 0));  /* no hurry... */</span>
<span class="lineNum">    1607 </span>            :         }
<span class="lineNum">    1608 </span>            :         else {  /* do the 'poscall' here */
<span class="lineNum">    1609 </span><span class="lineCov">      14654 :           int nres = ci-&gt;nresults;</span>
<span class="lineNum">    1610 </span><span class="lineCov">      14654 :           L-&gt;ci = ci-&gt;previous;  /* back to caller */</span>
<span class="lineNum">    1611 </span><span class="lineCov">      14654 :           L-&gt;top = base - 1;</span>
<span class="lineNum">    1612 </span><span class="lineCov">      14663 :           while (nres-- &gt; 0)</span>
<span class="lineNum">    1613 </span><span class="lineCov">          9 :             setnilvalue(s2v(L-&gt;top++));  /* all results are nil */</span>
<span class="lineNum">    1614 </span>            :         }
<span class="lineNum">    1615 </span><span class="lineCov">      14919 :         return;</span>
<span class="lineNum">    1616 </span>            :       }
<span class="lineNum">    1617 </span><span class="lineCov">       6493 :       vmcase(OP_RETURN1) {</span>
<span class="lineNum">    1618 </span><span class="lineCov">       6493 :         if (L-&gt;hookmask) {</span>
<span class="lineNum">    1619 </span><span class="lineNoCov">          0 :           L-&gt;top = ra + 1;</span>
<span class="lineNum">    1620 </span><span class="lineNoCov">          0 :           halfProtect(luaD_poscall(L, ci, 1));  /* no hurry... */</span>
<span class="lineNum">    1621 </span>            :         }
<span class="lineNum">    1622 </span>            :         else {  /* do the 'poscall' here */
<span class="lineNum">    1623 </span><span class="lineCov">       6493 :           int nres = ci-&gt;nresults;</span>
<span class="lineNum">    1624 </span><span class="lineCov">       6493 :           L-&gt;ci = ci-&gt;previous;  /* back to caller */</span>
<span class="lineNum">    1625 </span><span class="lineCov">       6493 :           if (nres == 0)</span>
<span class="lineNum">    1626 </span><span class="lineNoCov">          0 :             L-&gt;top = base - 1;  /* asked for no results */</span>
<span class="lineNum">    1627 </span>            :           else {
<span class="lineNum">    1628 </span><span class="lineCov">       6493 :             setobjs2s(L, base - 1, ra);  /* at least this result */</span>
<span class="lineNum">    1629 </span><span class="lineCov">       6493 :             L-&gt;top = base;</span>
<span class="lineNum">    1630 </span><span class="lineCov">       6493 :             while (--nres &gt; 0)  /* complete missing results */</span>
<span class="lineNum">    1631 </span><span class="lineNoCov">          0 :               setnilvalue(s2v(L-&gt;top++));</span>
<span class="lineNum">    1632 </span>            :           }
<span class="lineNum">    1633 </span>            :         }
<span class="lineNum">    1634 </span><span class="lineCov">       6493 :         return;</span>
<span class="lineNum">    1635 </span>            :       }
<span class="lineNum">    1636 </span><span class="lineCov">      11627 :       vmcase(OP_FORLOOP) {</span>
<span class="lineNum">    1637 </span><span class="lineCov">      11627 :         if (ttisinteger(s2v(ra + 2))) {  /* integer loop? */</span>
<span class="lineNum">    1638 </span><span class="lineCov">      11612 :           lua_Unsigned count = l_castS2U(ivalue(s2v(ra + 1)));</span>
<span class="lineNum">    1639 </span><span class="lineCov">      11612 :           if (count &gt; 0) {  /* still more iterations? */</span>
<span class="lineNum">    1640 </span><span class="lineCov">       7152 :             lua_Integer step = ivalue(s2v(ra + 2));</span>
<span class="lineNum">    1641 </span><span class="lineCov">       7152 :             lua_Integer idx = ivalue(s2v(ra));  /* internal index */</span>
<span class="lineNum">    1642 </span><span class="lineCov">       7152 :             chgivalue(s2v(ra + 1), count - 1);  /* update counter */</span>
<span class="lineNum">    1643 </span><span class="lineCov">       7152 :             idx = intop(+, idx, step);  /* add step to index */</span>
<span class="lineNum">    1644 </span><span class="lineCov">       7152 :             chgivalue(s2v(ra), idx);  /* update internal index */</span>
<span class="lineNum">    1645 </span><span class="lineCov">       7152 :             setivalue(s2v(ra + 3), idx);  /* and control variable */</span>
<span class="lineNum">    1646 </span><span class="lineCov">       7152 :             pc -= GETARG_Bx(i);  /* jump back */</span>
<span class="lineNum">    1647 </span>            :           }
<span class="lineNum">    1648 </span>            :         }
<span class="lineNum">    1649 </span>            :         else {  /* floating loop */
<span class="lineNum">    1650 </span><span class="lineCov">         15 :           lua_Number step = fltvalue(s2v(ra + 2));</span>
<span class="lineNum">    1651 </span><span class="lineCov">         15 :           lua_Number limit = fltvalue(s2v(ra + 1));</span>
<span class="lineNum">    1652 </span><span class="lineCov">         15 :           lua_Number idx = fltvalue(s2v(ra));</span>
<span class="lineNum">    1653 </span><span class="lineCov">         15 :           idx = luai_numadd(L, idx, step);  /* increment index */</span>
<span class="lineNum">    1654 </span><span class="lineCov">         15 :           if (luai_numlt(0, step) ? luai_numle(idx, limit)</span>
<span class="lineNum">    1655 </span>            :                                   : luai_numle(limit, idx)) {
<span class="lineNum">    1656 </span><span class="lineCov">         12 :             chgfltvalue(s2v(ra), idx);  /* update internal index */</span>
<span class="lineNum">    1657 </span><span class="lineCov">         12 :             setfltvalue(s2v(ra + 3), idx);  /* and control variable */</span>
<span class="lineNum">    1658 </span><span class="lineCov">         12 :             pc -= GETARG_Bx(i);  /* jump back */</span>
<span class="lineNum">    1659 </span>            :           }
<span class="lineNum">    1660 </span>            :         }
<span class="lineNum">    1661 </span><span class="lineCov">      11627 :         updatetrap(ci);  /* allows a signal to break the loop */</span>
<span class="lineNum">    1662 </span><span class="lineCov">      11627 :         vmbreak;</span>
<span class="lineNum">    1663 </span>            :       }
<span class="lineNum">    1664 </span><span class="lineCov">       4479 :       vmcase(OP_FORPREP) {</span>
<span class="lineNum">    1665 </span><span class="lineCov">       4479 :         TValue *pinit = s2v(ra);</span>
<span class="lineNum">    1666 </span><span class="lineCov">       4479 :         TValue *plimit = s2v(ra + 1);</span>
<span class="lineNum">    1667 </span><span class="lineCov">       4479 :         TValue *pstep = s2v(ra + 2);</span>
<span class="lineNum">    1668 </span><span class="lineCov">       4479 :         savestate(L, ci);  /* in case of errors */</span>
<span class="lineNum">    1669 </span><span class="lineCov">       8951 :         if (ttisinteger(pinit) &amp;&amp; ttisinteger(pstep)) { /* integer loop? */</span>
<span class="lineNum">    1670 </span><span class="lineCov">       4474 :           lua_Integer init = ivalue(pinit);</span>
<span class="lineNum">    1671 </span><span class="lineCov">       4474 :           lua_Integer step = ivalue(pstep);</span>
<span class="lineNum">    1672 </span>            :           lua_Integer limit;
<span class="lineNum">    1673 </span><span class="lineCov">       4474 :           if (step == 0)</span>
<span class="lineNum">    1674 </span><span class="lineCov">          1 :             luaG_runerror(L, &quot;'for' step is zero&quot;);</span>
<span class="lineNum">    1675 </span><span class="lineCov">       4473 :           setivalue(s2v(ra + 3), init);  /* control variable */</span>
<span class="lineNum">    1676 </span><span class="lineCov">       4473 :           if (forlimit(L, init, plimit, &amp;limit, step))</span>
<span class="lineNum">    1677 </span><span class="lineCov">          5 :             pc += GETARG_Bx(i) + 1;  /* skip the loop */</span>
<span class="lineNum">    1678 </span>            :           else {  /* prepare loop counter */
<span class="lineNum">    1679 </span>            :             lua_Unsigned count;
<span class="lineNum">    1680 </span><span class="lineCov">       4467 :             if (step &gt; 0) {  /* ascending loop? */</span>
<span class="lineNum">    1681 </span><span class="lineCov">       4465 :               count = l_castS2U(limit) - l_castS2U(init);</span>
<span class="lineNum">    1682 </span><span class="lineCov">       4465 :               if (step != 1)  /* avoid division in the too common case */</span>
<span class="lineNum">    1683 </span><span class="lineCov">          2 :                 count /= l_castS2U(step);</span>
<span class="lineNum">    1684 </span>            :             }
<span class="lineNum">    1685 </span>            :             else {  /* step &lt; 0; descending loop */
<span class="lineNum">    1686 </span><span class="lineCov">          2 :               count = l_castS2U(init) - l_castS2U(limit);</span>
<span class="lineNum">    1687 </span>            :               /* 'step+1' avoids negating 'mininteger' */
<span class="lineNum">    1688 </span><span class="lineCov">          2 :               count /= l_castS2U(-(step + 1)) + 1u;</span>
<span class="lineNum">    1689 </span>            :             }
<span class="lineNum">    1690 </span>            :             /* store the counter in place of the limit (which won't be
<span class="lineNum">    1691 </span>            :                needed anymore */
<span class="lineNum">    1692 </span><span class="lineCov">       4467 :             setivalue(plimit, l_castU2S(count));</span>
<span class="lineNum">    1693 </span>            :           }
<span class="lineNum">    1694 </span>            :         }
<span class="lineNum">    1695 </span>            :         else {  /* try making all values floats */
<span class="lineNum">    1696 </span>            :           lua_Number init; lua_Number limit; lua_Number step;
<span class="lineNum">    1697 </span><span class="lineCov">          5 :           if (unlikely(!tonumber(plimit, &amp;limit)))</span>
<span class="lineNum">    1698 </span><span class="lineNoCov">          0 :             luaG_forerror(L, plimit, &quot;limit&quot;);</span>
<span class="lineNum">    1699 </span><span class="lineCov">          5 :           if (unlikely(!tonumber(pstep, &amp;step)))</span>
<span class="lineNum">    1700 </span><span class="lineCov">          1 :             luaG_forerror(L, pstep, &quot;step&quot;);</span>
<span class="lineNum">    1701 </span><span class="lineCov">          4 :           if (unlikely(!tonumber(pinit, &amp;init)))</span>
<span class="lineNum">    1702 </span><span class="lineCov">          1 :             luaG_forerror(L, pinit, &quot;initial value&quot;);</span>
<span class="lineNum">    1703 </span><span class="lineCov">          3 :           if (step == 0)</span>
<span class="lineNum">    1704 </span><span class="lineNoCov">          0 :             luaG_runerror(L, &quot;'for' step is zero&quot;);</span>
<span class="lineNum">    1705 </span><span class="lineCov">          3 :           if (luai_numlt(0, step) ? luai_numlt(limit, init)</span>
<span class="lineNum">    1706 </span>            :                                    : luai_numlt(init, limit))
<span class="lineNum">    1707 </span><span class="lineNoCov">          0 :             pc += GETARG_Bx(i) + 1;  /* skip the loop */</span>
<span class="lineNum">    1708 </span>            :           else {
<span class="lineNum">    1709 </span>            :             /* make sure internal values are all float */
<span class="lineNum">    1710 </span><span class="lineCov">          3 :             setfltvalue(plimit, limit);</span>
<span class="lineNum">    1711 </span><span class="lineCov">          3 :             setfltvalue(pstep, step);</span>
<span class="lineNum">    1712 </span><span class="lineCov">          3 :             setfltvalue(s2v(ra), init);  /* internal index */</span>
<span class="lineNum">    1713 </span><span class="lineCov">          3 :             setfltvalue(s2v(ra + 3), init);  /* control variable */</span>
<span class="lineNum">    1714 </span>            :           }
<span class="lineNum">    1715 </span>            :         }
<span class="lineNum">    1716 </span><span class="lineCov">       4475 :         vmbreak;</span>
<span class="lineNum">    1717 </span>            :       }
<span class="lineNum">    1718 </span><span class="lineCov">       5963 :       vmcase(OP_TFORPREP) {</span>
<span class="lineNum">    1719 </span><span class="lineCov">       5963 :         if (!ttisnil(s2v(ra + 3))) {  /* is 'toclose' not nil? */</span>
<span class="lineNum">    1720 </span>            :           /* create to-be-closed upvalue for it */
<span class="lineNum">    1721 </span><span class="lineCov">          1 :           halfProtect(luaF_newtbcupval(L, ra + 3));</span>
<span class="lineNum">    1722 </span>            :         }
<span class="lineNum">    1723 </span><span class="lineCov">       5963 :         pc += GETARG_Bx(i);</span>
<span class="lineNum">    1724 </span><span class="lineCov">       5963 :         i = *(pc++);  /* go to next instruction */</span>
<span class="lineNum">    1725 </span>            :         lua_assert(GET_OPCODE(i) == OP_TFORCALL &amp;&amp; ra == RA(i));
<span class="lineNum">    1726 </span><span class="lineCov">       5963 :         goto l_tforcall;</span>
<span class="lineNum">    1727 </span>            :       }
<span class="lineNum">    1728 </span><span class="lineCov">      52478 :       vmcase(OP_TFORCALL) {</span>
<span class="lineNum">    1729 </span><span class="lineCov">      52478 :        l_tforcall:</span>
<span class="lineNum">    1730 </span>            :         /* 'ra' has the iterator function, 'ra + 1' has the state,
<span class="lineNum">    1731 </span>            :            'ra + 2' has the control variable, and 'ra + 3' has the
<span class="lineNum">    1732 </span>            :            to-be-closed variable. The call will use the stack after
<span class="lineNum">    1733 </span>            :            these values (starting at 'ra + 4')
<span class="lineNum">    1734 </span>            :         */
<span class="lineNum">    1735 </span>            :         /* push function, state, and control variable */
<span class="lineNum">    1736 </span><span class="lineCov">      52478 :         memcpy(ra + 4, ra, 3 * sizeof(*ra));</span>
<span class="lineNum">    1737 </span><span class="lineCov">      52478 :         L-&gt;top = ra + 4 + 3;</span>
<span class="lineNum">    1738 </span><span class="lineCov">      52478 :         Protect(luaD_call(L, ra + 4, GETARG_C(i)));  /* do the call */</span>
<span class="lineNum">    1739 </span><span class="lineCov">      52477 :         updatestack(ci);  /* stack may have changed */</span>
<span class="lineNum">    1740 </span><span class="lineCov">      52477 :         i = *(pc++);  /* go to next instruction */</span>
<span class="lineNum">    1741 </span><span class="lineCov">      52477 :         ra += 2;  /* adjust for next instruction */</span>
<span class="lineNum">    1742 </span>            :         lua_assert(GET_OPCODE(i) == OP_TFORLOOP &amp;&amp; ra == RA(i));
<span class="lineNum">    1743 </span><span class="lineCov">      52477 :         goto l_tforloop;</span>
<span class="lineNum">    1744 </span>            :       }
<span class="lineNum">    1745 </span><span class="lineCov">      52477 :       vmcase(OP_TFORLOOP) {</span>
<span class="lineNum">    1746 </span><span class="lineCov">      52477 :         l_tforloop:</span>
<span class="lineNum">    1747 </span><span class="lineCov">      52477 :         if (!ttisnil(s2v(ra + 2))) {  /* continue loop? */</span>
<span class="lineNum">    1748 </span><span class="lineCov">      46521 :           setobjs2s(L, ra, ra + 2);  /* save control variable */</span>
<span class="lineNum">    1749 </span><span class="lineCov">      46521 :           pc -= GETARG_Bx(i);  /* jump back */</span>
<span class="lineNum">    1750 </span>            :         }
<span class="lineNum">    1751 </span><span class="lineCov">      52477 :         vmbreak;</span>
<span class="lineNum">    1752 </span>            :       }
<span class="lineNum">    1753 </span><span class="lineCov">        377 :       vmcase(OP_SETLIST) {</span>
<span class="lineNum">    1754 </span><span class="lineCov">        377 :         int n = GETARG_B(i);</span>
<span class="lineNum">    1755 </span><span class="lineCov">        377 :         int c = GETARG_C(i);</span>
<span class="lineNum">    1756 </span>            :         unsigned int last;
<span class="lineNum">    1757 </span>            :         Table *h;
<span class="lineNum">    1758 </span><span class="lineCov">        377 :         if (n == 0)</span>
<span class="lineNum">    1759 </span><span class="lineCov">        228 :           n = cast_int(L-&gt;top - ra) - 1;</span>
<span class="lineNum">    1760 </span>            :         else
<span class="lineNum">    1761 </span><span class="lineCov">        149 :           L-&gt;top = ci-&gt;top;  /* correct top in case of GC */</span>
<span class="lineNum">    1762 </span><span class="lineCov">        377 :         if (c == 0) {</span>
<span class="lineNum">    1763 </span><span class="lineNoCov">          0 :           c = GETARG_Ax(*pc); pc++;</span>
<span class="lineNum">    1764 </span>            :         }
<span class="lineNum">    1765 </span><span class="lineCov">        377 :         h = hvalue(s2v(ra));</span>
<span class="lineNum">    1766 </span><span class="lineCov">        377 :         last = ((c-1)*LFIELDS_PER_FLUSH) + n;</span>
<span class="lineNum">    1767 </span><span class="lineCov">        377 :         if (last &gt; luaH_realasize(h))  /* needs more space? */</span>
<span class="lineNum">    1768 </span><span class="lineCov">        221 :           luaH_resizearray(L, h, last);  /* preallocate it at once */</span>
<span class="lineNum">    1769 </span><span class="lineCov">       1437 :         for (; n &gt; 0; n--) {</span>
<span class="lineNum">    1770 </span><span class="lineCov">       1060 :           TValue *val = s2v(ra + n);</span>
<span class="lineNum">    1771 </span><span class="lineCov">       1060 :           setobj2t(L, &amp;h-&gt;array[last - 1], val);</span>
<span class="lineNum">    1772 </span><span class="lineCov">       1060 :           last--;</span>
<span class="lineNum">    1773 </span><span class="lineCov">       1060 :           luaC_barrierback(L, obj2gco(h), val);</span>
<span class="lineNum">    1774 </span>            :         }
<span class="lineNum">    1775 </span><span class="lineCov">        377 :         vmbreak;</span>
<span class="lineNum">    1776 </span>            :       }
<span class="lineNum">    1777 </span><span class="lineCov">       2404 :       vmcase(OP_CLOSURE) {</span>
<span class="lineNum">    1778 </span><span class="lineCov">       2404 :         Proto *p = cl-&gt;p-&gt;p[GETARG_Bx(i)];</span>
<span class="lineNum">    1779 </span><span class="lineCov">       2404 :         halfProtect(pushclosure(L, p, cl-&gt;upvals, base, ra));</span>
<span class="lineNum">    1780 </span><span class="lineCov">       2404 :         checkGC(L, ra + 1);</span>
<span class="lineNum">    1781 </span><span class="lineCov">       2404 :         vmbreak;</span>
<span class="lineNum">    1782 </span>            :       }
<span class="lineNum">    1783 </span><span class="lineCov">         23 :       vmcase(OP_VARARG) {</span>
<span class="lineNum">    1784 </span><span class="lineCov">         23 :         int n = GETARG_C(i) - 1;  /* required results */</span>
<span class="lineNum">    1785 </span><span class="lineCov">         23 :         Protect(luaT_getvarargs(L, ci, ra, n));</span>
<span class="lineNum">    1786 </span><span class="lineCov">         23 :         vmbreak;</span>
<span class="lineNum">    1787 </span>            :       }
<span class="lineNum">    1788 </span><span class="lineCov">        479 :       vmcase(OP_VARARGPREP) {</span>
<span class="lineNum">    1789 </span><span class="lineCov">        479 :         luaT_adjustvarargs(L, GETARG_A(i), ci, cl-&gt;p);</span>
<span class="lineNum">    1790 </span><span class="lineCov">        479 :         updatetrap(ci);</span>
<span class="lineNum">    1791 </span><span class="lineCov">        479 :         if (trap) {</span>
<span class="lineNum">    1792 </span><span class="lineNoCov">          0 :           luaD_hookcall(L, ci);</span>
<span class="lineNum">    1793 </span><span class="lineNoCov">          0 :           L-&gt;oldpc = pc + 1;  /* next opcode will be seen as a &quot;new&quot; line */</span>
<span class="lineNum">    1794 </span>            :         }
<span class="lineNum">    1795 </span><span class="lineCov">        479 :         updatebase(ci);  /* function has new base after adjustment */</span>
<span class="lineNum">    1796 </span><span class="lineCov">        479 :         vmbreak;</span>
<span class="lineNum">    1797 </span>            :       }
<span class="lineNum">    1798 </span><span class="lineNoCov">          0 :       vmcase(OP_EXTRAARG) {</span>
<span class="lineNum">    1799 </span>            :         lua_assert(0);
<span class="lineNum">    1800 </span><span class="lineNoCov">          0 :         vmbreak;</span>
<span class="lineNum">    1801 </span>            :       }
<span class="lineNum">    1802 </span>            :     }
<span class="lineNum">    1803 </span>            :   }
<span class="lineNum">    1804 </span>            : }
<span class="lineNum">    1805 </span>            : 
<span class="lineNum">    1806 </span>            : /* }================================================================== */
<span class="lineNum">    1807 </span>            : 
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.13</a></td></tr>
  </table>
  <br>

</body>
</html>
